当我尝试运行 npm start 时,我不断收到 npm ENOENT 错误。我不知道如何解决这个问题。
我尝试更改文件夹的权限。
bryantcaruthers-> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/bryantcaruthers/workshop-vs-code-can-do-that/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/bryantcaruthers/workshop-vs-code-can-do-that/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! /Users/bryantcaruthers/.npm/_logs/2019-11-06T03_31_38_233Z-debug.log
能够无错误地运行 npm start。
最佳答案
错误是您运行代码的目录中没有 package.json 文件:
no such file or directory, open /Users/bryantcaruthers/workshop-vs-code-can-do-that/package.json
您是否期望该目录中存在 package.json
文件?或者您应该从其他地方运行 npm start
吗?
关于尝试运行 npm start 时出现 NPM 错误代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58722771/