【发布时间】:2018-02-17 20:08:03
【问题描述】:
只需按照 facebook.github 上的说明进行 create-react-native-app 首先得到:react-redux 5.0.6 需要 react@^0.14.0 的 peer ||反应@^15.0.0-0 .... 然后我卸载了 react-redux 现在得到了这个......
错误启动打包程序
错误:未安装 React 本机。请在您的项目目录中运行 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 npm 错误!代码生命周期 npm 错误!错误号 1 npm 错误! hello-world@0.1.0 开始:react-native-scripts 开始 npm 错误!退出状态 1 npm 错误! npm 错误!在 hello-world@0.1.0 启动脚本中失败。 npm 错误!这可能不是 npm 的问题。可能有额外的日志 上面的输出。
npm 错误!可以在以下位置找到此运行的完整日志: 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
【问题讨论】:
-
尝试在您的目录中运行
npm install,如果这不能解决,则编辑您的消息添加您的 package.json 文件。希望对你有帮助 -
npm 安装后
-
尝试安装 git... 然后重做你的
npm install。
标签: reactjs react-native react-redux