npm启动无法运行

npm启动无法运行,npm,npm-start,Npm,Npm Start,为什么每次我重启MacBook时npm start都无法运行?有没有我以前必须运行的代码?请帮忙 这就是我每次尝试的结果 Debugger attached. npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /Users/somprey/Desktop/demo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, ope

为什么每次我重启MacBook时npm start都无法运行?有没有我以前必须运行的代码?请帮忙

这就是我每次尝试的结果

Debugger attached.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/somprey/Desktop/demo/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/somprey/Desktop/demo/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/somprey/.npm/_logs/2020-10-11T03_08_40_658Z-debug.log
Waiting for the debugger to disconnect...
SYLVESTERs-MBP:demo somprey$ 

触发package.json内的启动脚本。根据错误消息,您的文件夹不包含package.json文件。

触发package.json内的启动脚本。根据错误消息,您的文件夹不包含package.json文件。

从错误日志中可以清楚地看到,该文件夹不包含package.json文件。确保从包含package.json的文件夹中运行脚本npm run start。

从错误日志中可以清楚地看到,该文件夹不包含package.json。确保您正在包含package.json的文件夹中运行脚本npm run start