我目前遇到一个问题,在尝试初始化项目时,以下命令(以及可能更多)无限期挂起:
npx create-react-app
npx create-expo-app
npx create-next-app
这是一个例子:
C:\Users\james\Documents>npx create-expo-app@latest my-app
然后它会播放旋转进度轮动画 (|/-|) ~2 次,并且无限期地卡住没有任何进度。我把它放在一边好几个小时了,什么也没发生。
Ctrl + C
用于终止批处理作业。
以下是我尝试解决该问题的一些方法:
npm config set registry http://registry.npmjs.org/ --global
设置注册表(仍然是同样的问题)npm cache clear --force
(仍然是同样的问题)create-expo-app
然后使用它(还是同样的问题)warning expo > @expo/cli > [email protected]: Glob versions prior to v9 are no longer supported
warning expo > babel-preset-expo > @react-native/babel-preset > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
warning expo > @expo/cli > @expo/rudder-sdk-node > @expo/bunyan > mv > [email protected]: Rimraf versions prior to v4 are no longer supported
warning expo > @expo/cli > @expo/rudder-sdk-node > @expo/bunyan > mv > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning "expo > babel-preset-expo > @react-native/babel-preset > @react-native/babel-plugin-codegen > @react-native/codegen > [email protected]" has unmet peer dependency "@babel/preset-env@^7.1.6".
然后,yarn 命令卡在空的进度条上:
[---------------------------------------------------------------------------------------------------------------] 0/719
请帮忙🙏
当前系统信息:
Windows 11
> node -v
v22.5.0
>npm -v
10.8.2
我刚刚安装了节点 v22.5.1,它开始工作,没有挂起,所以我想这就是修复方法