[英]I can't use "create-react-app" ("This is related to npm not being able to find a file.")
I tried every single thing I've found, but I just can't run create-react-app.我尝试了我发现的每一件事,但我无法运行 create-react-app。 I tried to uninstall node and install again, use yarn, clean cache, create with "npm init..." but nothing works.
我尝试卸载节点并再次安装,使用纱线,清理缓存,使用“npm init ...”创建,但没有任何效果。
Microsoft Windows [versão 10.0.19043.1889]
(c) Microsoft Corporation. Todos os direitos reservados.
C:\Program Files (x86)\Windows Resource Kits\Tools>cd C:\Users\user\meu_app
C:\Users\user\meu_app>node -v
v16.17.0
C:\Users\user\meu_app>npm -v
8.18.0
C:\Users\user\meu_app>npx create-react-app myapp
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Users\user
npm ERR! path C:\Users\user\meu_app
npm ERR! errno -4058
npm ERR! enoent spawn C:\Users\user 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\user\AppData\Local\npm-cache\_logs\2022-09-02T19_06_17_314Z-debug-0.log
I have never seen this issue before.我以前从未见过这个问题。 npx is distributed with npm 5.2+, so that shouldn't be the issue.
npx 与 npm 5.2+ 一起分发,所以这不应该是问题。 It seems your issue is similar to this one Can't install any NPM package, error 4058
看来您的问题与此类似Can't install any NPM package,错误 4058
Try these steps:尝试以下步骤:
See thread here: https://github.com/npm/npm/issues/17444请参阅此处的线程: https://github.com/npm/npm/issues/17444
Let me know if that helps;让我知道这是否有帮助; otherwise, I will keep looking.
否则,我会继续寻找。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.