npm start 无法运行 [英] npm start fails to run

查看:55
本文介绍了npm start 无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

why does npm start fails to run whenever I restart my MacBook? Is there any code that I would have to run before? Please help.

这是我每次尝试都会得到的结果......

This is the results I get whenever I try....

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$ 

截图

推荐答案

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

npm start triggers the start script inside package.json. As per the error message, your folder doesnt contain the package.json file.

这篇关于npm start 无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆