react-native start faild,npm start faild。项目没有运行

时间:2017-01-13 02:15:14

标签: npm react-native

react-native run-android。服务器是faild,我不知道如何解决它。希望有人能帮助我。

react-native start faild。

npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/Cellar/node@5/5.12.0/bin/node"     
"/usr/local/bin/npm" "start"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! 1@1.1.1 start: `node node_modules/react-native/local-  
cli/cli.js start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the 1@1.1.1 start script 'node node_modules/react- 
native/local-cli/cli.js start'.
npm ERR! Make sure you have the latest version of node.js and npm  
installed.
npm ERR! If you do, this is most likely a problem with the 1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this    
project with:
npm ERR!     npm bugs 1
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 1
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/apple/Desktop/project/reactproject/IRunning/npm-debug.log

上次登录:在ttys000上的1月13日星期五09:45:42 AppledeMacBook-Pro:〜apple $ /用户/苹果/桌面/项目/ reactproject / IRunning / node_modules / .0.36.0 @ react-native / packager / launchPackager.command;出口; ~/Desktop/project/reactproject/IRunning/node_modules/.0.36.0@react-
native / packager~ 在/ Users / apple / Desktop / project / reactproject / IRunning / node_modules(30ms)中扫描符号链接的1631个文件夹

┌────────────────────────────────────────────────────────────────────────    ────┐ 
 │  Running packager on port 8081.                                                        

│ 
 │                                                                                    
│ 
 │  Keep this packager running while developing on any JS projects. Feel      │ 
 │  free to close this tab and run your own packager instance if you          
│ 
 │  prefer.                                                                       
│ 
 │                                                                                
│ 
 │  https://github.com/facebook/react-native                                          
│ 
 │                                                                                        
│ 
└────────────────────────────────────────────────────────────────────────────┘ 
Looking for JS files in

Cannot read property 'on' of undefined

~
Process terminated. Press <enter> to close the window

1 个答案:

答案 0 :(得分:0)

看起来你必须重新安装或更新node.js和npm。尝试再次关注此页面上的安装步骤:

https://facebook.github.io/react-native/docs/getting-started.html#content

另外,请确保您按照正确使用的系统说明进行操作