无法安装或启动npm进行反应

时间:2018-08-15 13:25:47

标签: node.js reactjs npm

尝试安装React时引发以下错误。

npm ERR! path C:\Users\web\desktop\boy\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\web\desktop\boy\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\web\AppData\Roaming\npm-cache\_logs\2018-08-15T12_19_50_959Z-debug.log




 npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\web\desktop                                                                                                                \boy\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\web\desktop\bo                                                                                                                y\package.json'
npm WARN boy No description
npm WARN boy No repository field.
npm WARN boy No README data
npm WARN boy No license field

1 个答案:

答案 0 :(得分:3)

键入时

npm run start

npm 尝试在 package.json 文件的脚本部分中找到 start

由于您没有这样的文件,因此npm失败并显示ENOENT ,这是Error NO ENTry的缩写。

干杯。