npm ERR!代码ELIFECYCLE npm ERR!埃尔诺126

时间:2020-01-08 06:13:14

标签: node.js reactjs npm yarnpkg

首先,我应该先执行npm run build然后执行npm run install,但是无论在服务器上键入什么内容,我都会遇到此错误。

sh: 1: react-app-rewired: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! manager-polling-app-client@0.1.0 start: `react-app-rewired start`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the manager-polling-app-client@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-08T05_17_59_301Z-debug.log

NPM安装正在我的本地系统上运行,但在服务器上失败。

我清理了缓存,删除了node_modules和package-lock.json并重新安装它们,但是没有用。

我的package.json

{
  "name": "manager-polling-app-client",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^3.9.3",
    "ajv": "^6.0.0",
    "ajv-keywords": "^3.2.0",
    "antd": "^3.16.3",
    "arui-feather": "^12.12.0",
    "b64-to-blob": "^1.2.19",
    "moment": "^2.22.2",
    "pdfmake": "^0.1.53",
    "prop-types": "^15.7.2",
    "react": "^16.11.0",
    "react-awesome-modal": "^2.0.5",
    "react-data-export": "^0.5.0",
    "react-dom": "^16.11.0",
    "react-export-excel": "^0.5.3",
    "react-router-dom": "^4.3.1",
    "react-scripts": "1.1.1",
    "react-select": "^2.4.2",
    "xlsx": "^0.14.4"
  },
  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "babel-plugin-import": "^1.11.0",
    "react-app-rewire-less": "^2.1.3",
    "react-app-rewired": "^1.6.2"
  }
}

P.S。我发现我可以使用chmod -R 777更改权限,但是人们说这是个坏主意。就个人而言,它可以在服务器上运行,我不想使用权限(担心会使它崩溃,我认为还有另一种解决问题的方法。

P.P.S。如果在这里我应该使用yarn,那么我应该在本地系统上yarn add,然后在服务器上永久使用yarn?

P.P.P.S。在npm和纱线方面,我真的是个新手。如果问题看起来很愚蠢,请对不起

0 个答案:

没有答案