у меня на локальном Windows узле v8.12.0 и npm v6.4.1. На сервере у меня есть узел v11.10.0 и npm v6.7.0.
Я заменил проект на сервере резервным копированием на локальном компьютере, но когда я набираю npm start
, у меня появляется эта ошибка.
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-14T05_41_00_295Z-debug.log
Возможно ли, что проект не запускается на сервере из-за конфликта версии узла? Если да, следует ли обновить узел на локальном узле или узел понижения на сервере?
PS Я думаю, chmod -R 777
НЕ решит проблему, потому что другие файлы на сервере имеют те же права, и они запускаются без проблем.
PPS есть мой пакет. json файл, если он необходим
{
"name": "manager-polling-app-client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^3.9.3",
"ajv": "^6.9.1",
"ajv-keywords": "^3.4.1",
"antd": "^3.20.0",
"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.2.0",
"react-awesome-modal": "^2.0.5",
"react-data-export": "^0.5.0",
"react-dom": "^16.2.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"
}
}
Файл журнала PPPS
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.7.0
3 info using node@v11.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle manager-polling-app-client@0.1.0~prestart: manager-polling-app- client@0.1.0
6 info lifecycle manager-polling-app-client@0.1.0~start: manager-polling-app-cli ent@0.1.0
7 verbose lifecycle manager-polling-app-client@0.1.0~start: unsafe-perm in lifec ycle true
8 verbose lifecycle manager-polling-app-client@0.1.0~start: PATH: /usr/local/lib /node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/mybpm/manager-po lling-app-client/node_modules/.bin:/usr/lib/jvm/java-8-openjdk-amd64/bin:/usr/lo cal/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/game s:/snap/bin
9 verbose lifecycle manager-polling-app-client@0.1.0~start: CWD: /root/mybpm/man ager-polling-app-client
10 silly lifecycle manager-polling-app-client@0.1.0~start: Args: [ '-c', 'react- app-rewired start' ]
11 silly lifecycle manager-polling-app-client@0.1.0~start: Returned: code: 126 signal: null
12 info lifecycle manager-polling-app-client@0.1.0~start: Failed to exec start s cript
13 verbose stack Error: manager-polling-app-client@0.1.0 start: `react-app-rewir ed start`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/np m/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:197:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/np m/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:197:13)
13 verbose stack at maybeClose (internal/child_process.js:984:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_proc ess.js:265:5)
14 verbose pkgid manager-polling-app-client@0.1.0
15 verbose cwd /root/mybpm/manager-polling-app-client
16 verbose Linux 4.4.0-135-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v11.10.0
19 verbose npm v6.7.0
20 error code ELIFECYCLE
21 error errno 126
22 error manager-polling-app-client@0.1.0 start: `react-app-rewired start`
22 error Exit status 126
23 error Failed at the manager-polling-app-client@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional log