只是按照 facebook.github 上的说明创建-react-native-app 首先得到:react-redux 5.0.6 requires a peer of react@^0.14.0 || react @^15.0.0-0 .... 然后我卸载了 react-redux 现在得到这个......
启动打包器时出错
错误:未安装 React Native。请在您的项目目录中运行 npm install。 上午 1:23:51:启动打包程序时出错:错误:无法启动项目。请修复 他出错并重新启动项目。 在 E:\xdl\src\Project.js:1126:11 接下来(本地) 在步骤 (E:\react-native\hello-world\node_modules\xdl\build\Project.js:1504: 191) 在 E:\react-native\hello-world\node_modules\xdl\build\Project.js:1504:361 错误!代码生命周期 错误!错误号 1 错误! hello-world@0.1.0 开始:react-native-scripts 开始 错误!退出状态 1 错误! 错误! hello-world@0.1.0 启动脚本失败。 错误!这可能不是 npm 的问题。可能有额外的日志 上面的ging输出。
npm 错误!可以在以下位置找到此运行的完整日志: 错误! C:\Users\Jawad Ul Hassan\AppData\Roaming\npm-cache_logs\2017-09-08 T20_23_51_654Z-debug.log
可能是我的错误或关于正确操作的任何建议?
在 npm install 之后
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (C:\Users\Jawad Ul Hassan\AppData\
Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12)
npm WARN addRemoteGit at F (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_modules\npm\node_modules\which\which.js:68:19)
npm WARN addRemoteGit at E (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\nod
e_modules\npm\node_modules\which\which.js:80:29)
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\which.js:89:16
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\index.js:42:5
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\windows.js:36:5
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\graceful-fs\polyfills.js:284:29
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit expo/node-websql#18.0.0 resetting remote C:\Users\Jawad U
l Hassan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-websql-
git-18-0-0-8213877d because of error: { Error: not found: git
npm WARN addRemoteGit at getNotFoundError (C:\Users\Jawad Ul Hassan\AppData\
Roaming\npm\node_modules\npm\node_modules\which\which.js:13:12)
npm WARN addRemoteGit at F (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\nod
e_modules\npm\node_modules\which\which.js:68:19)
npm WARN addRemoteGit at E (C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\nod
e_modules\npm\node_modules\which\which.js:80:29)
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\which.js:89:16
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\index.js:42:5
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\which\node_modules\isexe\windows.js:36:5
npm WARN addRemoteGit at C:\Users\Jawad Ul Hassan\AppData\Roaming\npm\node_m
odules\npm\node_modules\graceful-fs\polyfills.js:284:29
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT'
}
npm ERR! git clone --template=C:\Users\Jawad Ul Hassan\AppData\Roaming\npm-cache
\_git-remotes\_templates --mirror git@github.com:expo/node-websql.git C:\Users\J
awad Ul Hassan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-w
ebsql-git-18-0-0-8213877d: undefined
npm ERR! git clone --template=C:\Users\Jawad Ul Hassan\AppData\Roaming\npm-cache
\_git-remotes\_templates --mirror git@github.com:expo/node-websql.git C:\Users\J
awad Ul Hassan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-expo-node-w
ebsql-git-18-0-0-8213877d: undefined
最佳答案
当我安装 react-navigation 包时,我发生了错误。我已经解决了我的问题
- 删除node_modules、package-lock.json
- 运行“
yarn 安装
”。 - 运行“
npm start
”。
关于reactjs - 错误 : React native is not installed. 请在您的项目目录中运行 `npm install`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46124250/