尝试安装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
最佳答案
当你输入时
npm run start
npm 尝试在 package.json 文件的脚本部分中查找 start。
由于您没有此类文件,npm 会失败并显示 ENOENT,这是 Error NO ENTry 的缩写。
干杯。
关于node.js - 无法安装或启动 npm for React,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51859618/