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, 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 文件。
推荐阅读
- c# - 无法从 Azure API 连接到 SQL Server
- postgresql - 与 Presto 类似的 Tableau Extract 功能
- assembly - 装配中通过数据成员的数组访问问题
- javascript - Vue-bootstrap 导航链接到“外部应用程序”
- amazon-web-services - 用于 S3 中静态网站的 AWS SSL 和 Google Domain
- java - 在迭代之间更改动画的值
- java - “android.os.NetworkOnMainThreadException”即使在 AsyncTask 中运行
- reactjs - 使用反应挂钩做出反应的登录页面
- android - 新创建的 Flutter/Android 项目构建失败
- java - Java 中 Long 类的哪些方法会产生异常?