我可以在Windows 10笔记本电脑中启动npm,但不能在goormIDE(Ubuntu 18.04 LTS)中启动npm。
我阅读了10次调试日志,但是我不知道该怎么办。
sh: 1: react-scripts: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! carcommunity@0.1.0 start: `set PORT=80 && react-scripts start`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the carcommunity@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-08-12T11_03_24_134Z-debug.log
这是debug.log:
13 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:259:5)
14 verbose pkgid carcommunity@0.1.0
15 verbose cwd /workspace/carCommunity
16 verbose Linux 4.4.0-1111-aws
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v10.16.3
19 verbose npm v6.11.3
20 error code ELIFECYCLE
21 error errno 126
22 error carcommunity@0.1.0 start: `set PORT=80 && react-scripts start`
22 error Exit status 126
23 error Failed at the carcommunity@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
答案 0 :(得分:1)
根据您的设置方式,您可能需要以sudo的身份运行npm。因此,尝试从sudo react-scripts开始。