Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js npm启动givin错误_Node.js_Reactjs - Fatal编程技术网

Node.js npm启动givin错误

Node.js npm启动givin错误,node.js,reactjs,Node.js,Reactjs,我正在使用react(使用git下载的项目)构建一个项目,最近在运行时遇到以下错误 npm启动 错误是 enter code here 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@5.4.2 3 info using node@v8.7.0 4 verbose run-script [ 'pre

我正在使用react(使用git下载的项目)构建一个项目,最近在运行时遇到以下错误

npm启动

错误是

enter code here
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@5.4.2
3 info using node@v8.7.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle @~prestart: @
6 info lifecycle @~start: @
7 verbose lifecycle @~start: unsafe-perm in lifecycle true
8 verbose lifecycle @~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/ambuj/Documents/react-weather-app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/snap/bin
9 verbose lifecycle @~start: CWD: /home/ambuj/Documents/react-weather-app
10 silly lifecycle @~start: Args: [ '-c', 'concurrently "yarn serve:webpack" "yarn serve:json"' ]
11 silly lifecycle @~start: Returned: code: 1  signal: null
12 info lifecycle @~start: Failed to exec start script
13 verbose stack Error: @ start: `concurrently "yarn serve:webpack" "yarn serve:json"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid @
15 verbose cwd /home/ambuj/Documents/react-weather-app
16 verbose Linux 4.10.0-19-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v8.7.0
19 verbose npm  v5.4.2
20 error code ELIFECYCLE
21 error errno 1
22 error @ start: `concurrently "yarn serve:webpack" "yarn serve:json"`
22 error Exit status 1
23 error Failed at the @ start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
在此处输入代码
0信息如果以“确定”结尾,则有效
1详细cli['/usr/local/bin/node','/usr/local/bin/npm','start']
2信息使用npm@5.4.2
3信息使用node@v8.7.0
4详细的运行脚本['prestart','start','poststart']
5信息生命周期@~启动前:@
6信息生命周期@~开始:@
7详细生命周期@~开始:生命周期中的不安全perm为true
8详细生命周期@~start:PATH:/usr/local/lib/node_modules/npm/bin/node gyp bin:/home/ambuj/Documents/react weather app/node_modules/.bin:/usr/local/sbin:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/snap/bin:/snap/bin
9详细生命周期@~start:CWD:/home/ambuj/Documents/react weather app
10愚蠢的生命周期@~start:Args:['-c','并发“纱线服务:网页包”“纱线服务:json”]
11@~start:返回:代码:1信号:null
12信息生命周期@~start:无法执行启动脚本
13详细堆栈错误:@start:`concurrent“纱线服务:网页包”“纱线服务:json”`
13详细堆栈退出状态1
13 EventEmitter上的详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm lifecycle/index.js:280:16)
13 emitTwo上的详细堆栈(events.js:125:13)
13 EventEmitter.emit上的详细堆栈(events.js:213:7)
13子进程上的详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm lifecycle/lib/spawn.js:55:14)
13 emitTwo上的详细堆栈(events.js:125:13)
13 ChildProcess.emit上的详细堆栈(events.js:213:7)
13 maybeClose的详细堆栈(internal/child_process.js:927:16)
13 Process.ChildProcess.\u handle.onexit处的详细堆栈(internal/child\u Process.js:211:5)
14详细的pkgid@
15详细cwd/home/ambuj/Documents/react天气应用程序
16详细Linux 4.10.0-19-generic
17详细argv“/usr/local/bin/node”“/usr/local/bin/npm”“开始”
18详细节点v8.7.0
19详细npm v5.4.2
20错误代码ELIFECYCLE
21错误1
22错误@start:`concurrent“纱线服务:网页包”“纱线服务:json”`
22错误退出状态1
23在@start脚本中出现错误失败。
23错误这可能不是npm的问题。上面可能还有其他日志输出。
24详细退出[1,true]

首先使用
npm install
安装所有依赖项,然后运行
npm start
尝试删除文件夹节点模块,并使用npm install重新安装它们

是否安装了
warn
?向我们展示用于网页包的package.json