繁体   English   中英

尝试在 VS 代码中的终端中运行“npm start”时,我一直遇到同样的错误:npm 无法找到文件。 我应该怎么办?

[英]I keep running into the same error when trying to run "npm start" in my terminal in VS code : npm not being able to find a file. What should I do?

在此处输入图像描述 在此处输入图像描述我已尝试在我的终端中在 Mac 上的 VS 代码上运行“npm start”。 我一直遇到同样的问题。

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/ericwehder/Desktop/Web Dev/Typescript/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/ericwehder/Desktop/Web Dev/Typescript/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

package.json添加此脚本。

  "scripts": {
    "dev": "lite-server"
  },

然后在终端中运行以下命令启动:

npm run dev

文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM