You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用npx create-react-app创建React应用时遭遇ENOENT错误求助

npx create-react-app创建React应用时遭遇ENOENT错误求助

我的环境版本

  • node v20.11.1
  • npm 10.2.4

遇到的错误

执行命令 npx create-react-app firstweb 时出现以下错误:

PS C:\Users\HP\Desktop\react js> npx create-react-app firstweb

node+×

X

npm ERRI code ENOENT

npm ERRI syscall getaddrinfo

npm ERRI errno ENOENT

npm ERRI enoent request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENDENT registry.npmjs.org

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

npm ERRI A complete log of this run can be found in: C:\Users\HP\AppData\Local\npm-cache\logs\2024-03-20T11_50_32_084Z-debug-0.log

已尝试的解决办法

我已经尝试过在Roaming目录下创建npm文件夹,也卸载并重新安装了Node.js,但问题依然存在,还是出现同样的错误。

备注:内容来源于stack exchange,提问作者Seema

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 12:09:33