运行npm时发生react-native错误

时间:2018-05-07 07:36:01

标签: react-native

我恢复设置计算机后,我使用react-native init创建了原生应用程序,当我运行npm run start命令时,它会显示:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start' ]
2 info using npm@5.6.0
3 info using node@v9.4.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle androidapp@0.0.1~prestart: androidapp@0.0.1
6 info lifecycle androidapp@0.0.1~start: androidapp@0.0.1
7 verbose lifecycle androidapp@0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle androidapp@0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\User\projects\androidapp\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\User\AppData\Roaming\npm
9 verbose lifecycle androidapp@0.0.1~start: CWD: C:\Users\User\projects\androidapp
10 silly lifecycle androidapp@0.0.1~start: Args: [ '/d /s /c',
10 silly lifecycle   'node node_modules/react-native/local-cli/cli.js start' ]
11 silly lifecycle androidapp@0.0.1~start: Returned: code: 1  signal: null
12 info lifecycle androidapp@0.0.1~start: Failed to exec start script
13 verbose stack Error: androidapp@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:160:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:160:13)
13 verbose stack     at maybeClose (internal/child_process.js:943:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid androidapp@0.0.1
15 verbose cwd C:\Users\User\projects\androidapp
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
18 verbose node v9.4.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error androidapp@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
22 error Exit status 1
23 error Failed at the androidapp@0.0.1 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 个答案:

没有答案