[英]I cannot open a new project WebStorm React
I cannot open a new project at the WebStorm React JS.我无法在 WebStorm React JS 中打开新项目。
I am starting a new project and I got this error.我正在开始一个新项目,但出现此错误。
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js" --yes create-react-app .
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\projects\todo-new/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\projects\todo-
new\package.json'
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\ivanh\AppData\Local\npm-cache\_logs\2021-03-08T18_52_52_706Z-debug.log
Done
I think the issue is that there is a space in your file name我认为问题在于您的文件名中有空格
no such file or directory, open 'C:\projects\todo- new\package.json'
if you look between todo-
and new
there is a space.如果您在
todo-
和new
之间查看,则有一个空格。
If you dont have a package.json file, run npm init
to create one如果您没有 package.json 文件,请运行
npm init
创建一个
I found a way.我找到了一个方法。 maybe it will help someone.
也许它会帮助某人。
npm uninstall -g create-react-app
npm install -g npm@latest
deleted folder node_modules删除文件夹 node_modules
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.