以下问题的解决方案应该是什么?

问题描述 投票:0回答:2

我正在尝试创建一个新的React-Native项目,但我得到以下错误堆栈跟踪:

C:\Users\MY HP\Desktop\MyProjects\ReactNative\project01>expo init RunAtleast
? Choose a template: expo-template-blank
√ 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 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\MY HP\AppData\Roaming\npm-cache\_logs\2019-04-04T18_59_55_657Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.

有没有人对如何解决这个错误有任何想法?任何帮助将不胜感激!

react-native
2个回答
0
投票

看起来问题出在Windows下安装git。快速搜索出现了这个链接:https://github.com/amplience/cms-javascript-sdk/issues/1

也许你可以在讨论之后找到更多想法如何解决这个问题?


0
投票

它已解决,因为我使用npm缓存清除--force并重新安装npm install -g expo-cli。问题得到解决..感谢stackovelflow社区提供此类帮助..

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