我正按照https://facebook.github.io/react-native/docs/getting-started.html#caveats中提供的说明尝试在我的Mac El Capitan系统中设置React Native 当我做的时候
npm install -g create-react-native-app
输出如下:
MacBook-Pro-de-Hector:bin Hector$ npm install -g create-react-native-app
npm ERR! not a package /usr/local/bin/create-react-native-app
npm ERR! addLocal Could not install /usr/local/bin/create-react-native-app
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "create-react-native-app"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! path /var/folders/yz/8y2s_bl167xgcnyhdtf0yqs40000gn/T/npm-8989-2d1edf9b/unpack-97e54ff1/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/var/folders/yz/8y2s_bl167xgcnyhdtf0yqs40000gn/T/npm-8989-2d1edf9b/unpack-97e54ff1/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/var/folders/yz/8y2s_bl167xgcnyhdtf0yqs40000gn/T/npm-8989-2d1edf9b/unpack-97e54ff1/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/bin/npm-debug.log
我已经尝试了一切,包括清理缓存和其他组中的其他建议,但它没有工作