gpt4 book ai didi

javascript - 执行 expo init 命令时出现以下错误

转载 作者:搜寻专家 更新时间:2023-11-01 00:48:29 25 4
gpt4 key购买 nike

Installing dependencies...
npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\SAMSUNG\AppData\Roaming\npm-cache\_logs\2019-04-01T08_16_06_470Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.

最佳答案

请确保您有 git installed . NPM 需要 git 来安装一些包。您可以通过以下方式检查是否安装了 git:

git --version

如果是这样,根据reported issue ,删除并重新安装 node_modules 应该有所帮助:

rm -rf node_modules && npm install

您也可以尝试使用 yarn 解决问题:

brew install yarn
npm uninstall -g create-react-native-app
yarn global add create-react-native-app

关于javascript - 执行 expo init 命令时出现以下错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55450764/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com