npm start givin错误

时间:2017-10-20 07:59:34

标签: node.js reactjs

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

npm start

错误是

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 ]

2 个答案:

答案 0 :(得分:1)

首先使用npm install安装所有依赖项,然后运行npm start

答案 1 :(得分:0)

尝试删除文件夹node_modules并使用npm install

重新安装它们
相关问题