Maison > Questions et réponses > le corps du texte
react-native run-android 启动本地服务时失败。
报错如下
Last login: Thu Jan 12 21:44:07 on ttys000
appledembp:IRunning apple$ react-native start
Scanning 1630 folders for symlinks in /Users/apple/Desktop/project/reactproject/IRunning/node_modules (24ms)
┌────────────────────────────────────────────────────────────────────────────┐
│ 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
/Users/apple/Desktop/project/reactproject/IRunning/node_modules/.0.33.0@react-native
Cannot read property 'on' of undefined
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