2017-10-18 74 views
0

我使用节点v6.11.3,npm版本3.10.10 和创建反应本机应用程序版本:1.0.0,macOS Sierra 10.12.6 当我试图按照我发现这里的指令: https://facebook.github.io/react-native/docs/getting-started.html#content创建一个最小的反应,本机应用程序,我收到以下错误问题与react-native:启动脚本'react-native-scripts开始'

0 info it worked if it ends with ok 
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
5 info lifecycle [email protected]~prestart: [email protected] 
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 
7 info lifecycle [email protected]~start: [email protected] 
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/alejandro.caballero/Projects/AwesomeProject/node_modules/.bin:/Users/alejandro.caballero/.rvm/gems/ruby-2.4.1/bin:/Users/alejandro.caballero/.rvm/gems/[email protected]/bin:/Users/alejandro.caballero/.rvm/rubies/ruby-2.4.1/bin:/Users/alejandro.caballero/.jenv/shims:/Users/alejandro.caballero/.jenv/bin:/Users/alejandro.caballero/.jenv/shims:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/opt/X11/bin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/munki:/Library/TeX/texbin:/Users/alejandro.caballero/.rvm/bin 
10 verbose lifecycle [email protected]~start: CWD: /Users/alejandro.caballero/Projects/AwesomeProject 
11 silly lifecycle [email protected]~start: Args: [ '-c', 'react-native-scripts start' ] 
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 
13 info lifecycle [email protected]~start: Failed to exec start script 
14 verbose stack Error: [email protected] start: `react-native-scripts start` 
14 verbose stack Exit status 1 
14 verbose stack  at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 
14 verbose stack  at emitTwo (events.js:106:13) 
14 verbose stack  at EventEmitter.emit (events.js:191:7) 
14 verbose stack  at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) 
14 verbose stack  at emitTwo (events.js:106:13) 
14 verbose stack  at ChildProcess.emit (events.js:191:7) 
14 verbose stack  at maybeClose (internal/child_process.js:920:16) 
14 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 
15 verbose pkgid [email protected] 
16 verbose cwd /Users/alejandro.caballero/Projects/AwesomeProject 
17 error Darwin 16.7.0 
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
19 error node v6.11.3 
20 error npm v3.10.10 
21 error code ELIFECYCLE 
22 error [email protected] start: `react-native-scripts start` 
22 error Exit status 1 
23 error Failed at the [email protected] start script 'react-native-scripts start'. 
23 error Make sure you have the latest version of node.js and npm installed. 
23 error If you do, this is most likely a problem with the AwesomeProject package, 
23 error not with npm itself. 
23 error Tell the author that this fails on your system: 
23 error  react-native-scripts start 
23 error You can get information on how to open an issue for this project with: 
23 error  npm bugs AwesomeProject 
23 error Or if that isn't available, you can get their info via: 
23 error  npm owner ls AwesomeProject 
23 error There is likely additional logging output above. 
24 verbose exit [ 1, true ] 

我已经试过卸载节点并重新安装它并没有什么

任何想法?

回答

1

你可以在终端下面试试命令,可能会帮你。

  • 酿造卸载节点
  • 须藤乔敦 - R的 “$ USER”:管理员在/ usr /本地
  • 须藤乔敦 - R的 “$ USER”:管理/图书馆/缓存/家酿
  • 酿造安装节点
  • NPM安装-g创建反应的天然应用内
  • 创建反应的天然应用内Your_Project_Name
  • CD Your_Project_Name
  • npm start

如果上述命令不适用于您,那么一旦尝试了下面的命令并再次重复上述所有命令。