执行“expo init”命令时出现以下错误[重复]

问题描述 投票:-1回答:1

这个问题在这里已有答案:

我想按照本教程(https://facebook.github.io/react-native/docs/getting-started.html)开始学习本机反应。

我按照第一步操作,在命令行上遇到了一些问题:expo init AwesomeProject

这是日志:

'''

? Choose a template: expo-template-tabs
√ Please enter a few initial configuration values.
  Read more: https://docs.expo.io/versions/latest/workflow/configuration/ · 100% completed
Extracting project files...
Customizing project...
Installing dependencies...
npm WARN deprecated [email protected]: 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 WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
[  ................] / fetchMetadata: sill pacote range manifest for copy-descriptor@^0.1.0 f[ 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://[email protected]/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\acer\AppData\Roaming\npm-cache\_logs\2019-04-08T15_58_42_285Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
''''
javascript reactjs git react-native cmd
1个回答
0
投票

安装git关注链接:https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/如果仍然无法正常运行cmd npm cache clean --force

© www.soinside.com 2019 - 2024. All rights reserved.