当前位置: 首页 > 知识库问答 >
问题:

错误:未安装“反应本机”。请在项目目录中运行“npm 安装”

邵亦
2023-03-14

只是按照facebook.github上的说明进行create-react-native-app首先得到的:react-redux 5.0.6需要react@^0.14.0 || react@^15.0.0-0的对等体....然后我卸载了react-redux,得到了这个...

这里是包.json

错误启动包装机

错误:未安装React native。请在您的项目目录中运行npm install。上午1:23:51:启动打包程序时出错:错误:无法启动项目。请修复错误并重新启动项目。at E:\ xdl \ src \ project . js:1126:11 at next(native)at step(E:\ react-native \ hello-world \ node _ modules \ xdl \ build \ project . js:1504:191 at E:\ react-native \ hello-world \ node _ modules \ xdl \ build \ project . js:1504:361 NPM ERR!代码ELIFECYCLE npm错误!错误1 npm错误!hello-world @ 0 . 1 . 0 start:react-native-scripts start NPM ERR!退出状态1 npm错误!npm错误!hello-world@0.1.0启动脚本失败。npm错误!这可能不是npm的问题。上面可能有额外的日志输出。

npm错误!此运行的完整日志可以在以下位置找到:npm ERR!c:\ Users \ Jawad Ul Hassan \ AppData \ Roaming \ NPM-cache _ logs \ 2017-09-08 T20 _ 23 _ 51 _ 654 z-debug . log

我可能犯了什么错误,或者有什么建议可以正确地做这件事?

npm安装后得到这个

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

共有3个答案

岑驰
2023-03-14

您可以在第一行看到,没有找到git

==

先安装git。

百里星纬
2023-03-14

这可能是因为 npm 版本 v5 所以

npm5仍然很麻烦,请使用yarn或npm4版本。

npm i -g yarn
npm i -g npm@4

或者确保从项目目录安装npm。这也是你得到这个错误的原因之一

npm i
范承望
2023-03-14

当我安装react-导航包时,出现了错误。我已经修复了我的问题。

  1. 删除node_modules、包锁。json
  2. 运行“纱线安装
  3. 运行“npm启动
 类似资料:
  • 问题内容: 我有错误: 我在OS X上使用go版本1.1。 我可以构建并运行,但无法安装软件包。 我的环境: 项目树: 我可以没有错误地构建: 这是一个简单的示例: 问题答案: 命令去 GOPATH环境变量 列出的每个目录必须具有规定的结构: 该目录包含源代码。“ ” 下面的路径确定导入路径或可执行文件名称。 该目录包含已安装的软件包对象。就像在Go树中一样,每个目标操作系统和体系结构对都有其自己

  • 当我试图用maven安装一个项目时,我遇到了这个错误。我看了很多帖子说这个错误是因为maven使用了另一个版本的java,但这不是我的情况(我想),因为我运行的每个命令都说使用的版本是java 1.7。 这是终端的结果: mvn的输出-版本 Java Home:< code >/Library/Java/JavaVirtualMachines/JDK 1 . 7 . 0 _ 79 . JDK/Co

  • 问题内容: 我在Windows 7计算机上安装了python 3.5,该计算机没有任何其他python版本。 pip随附python 3.5安装。 我用pip安装库 它在以下位置安装了库: 但是像pycharm这样的IDE会出现在: 那是应该安装它的地方。 因此,IDE无法识别该库,因此我无法在IDE中获得任何帮助。 解决方法是将库复制到所需的文件夹中,并且可以正常工作,但是我想知道如何配置pip

  • 我的公司正在开发一个利用博世视频SDK的应用程序。我已经在我的安装项目中包含了所需的DLL文件,我相信它们在我的项目安装时正在注册,但我在运行时遇到了“未注册类”错误。。 我怀疑我的问题来自这样一个事实,即这个应用程序是在x64中编译的,并且使用BOSCH视频软件开发工具包中的64位DLL。这是有意的,我们绝对希望它以64位模式安装和运行。 确切的错误消息是“由于以下错误,为CLSID为{D12F

  • 您好,感谢阅读本主题我与react合作我现在正在尝试学习安装react新应用程序时的卸载react新项目时显示错误我的问题是什么 在命令终端中 npm错误!在“…9.1”、“tslint config-p”附近进行分析时,JSON输入意外结束 npm错误!此运行的完整日志可在以下位置找到:npm ERR C:\Users\john\AppData\Roaming\npm-cache\u logs\

  • 我正在运行npm来安装mnodesql,这是一个用于sql服务器驱动程序的npm库。我安装这个Windows Server 2012盒。 我已经安装了Visual C 2010、node gyp和Python 2.7.x.x作为依赖项,所有这些安装都是成功的。 当我运行npm install msnodesql时,我得到一个红色的大错误: (x86)\MSBuild\Microsoft.Cpp\v