我运行 npm start 命令并收到以下错误:
MacBook-Pro-Kirill:crud-ui KirillBelyakov$ npm start
> crud-ui@0.1.0 start /Users/KirillBelyakov/crud-ui
> react-scripts start
sh: react-scripts: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! crud-ui@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the crud-ui@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/KirillBelyakov/.npm/_logs/2019-07-22T07_49_08_363Z-debug.log
这是日志:
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.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle crud-ui@0.1.0~prestart: crud-ui@0.1.0
6 info lifecycle crud-ui@0.1.0~start: crud-ui@0.1.0
7 verbose lifecycle crud-ui@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle crud-ui@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/KirillBelyakov/crud-ui/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle crud-ui@0.1.0~start: CWD: /Users/KirillBelyakov/crud-ui
10 silly lifecycle crud-ui@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 info lifecycle crud-ui@0.1.0~start: Failed to exec start script
12 verbose stack Error: crud-ui@0.1.0 start: `react-scripts start`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid crud-ui@0.1.0
14 verbose cwd /Users/KirillBelyakov/crud-ui
15 verbose Darwin 18.6.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
17 verbose node v10.16.0
18 verbose npm v6.9.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error crud-ui@0.1.0 start: `react-scripts start`
23 error spawn ENOENT
24 error Failed at the crud-ui@0.1.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
如何解决这个问题?