![](/img/trans.png)
[英]I got path error : [module not found] whenever I try to run any npm related command in VS Code
[英]I'm unable to run the script through npm run command. My script name is “start”. whenever i run this script through this command i got error
实际上,我正在尝试将我的应用程序部署到 Heroku(这与 Heroku 无关)。 以前我只是通过运行 app.js(脚本名称)在本地机器上运行脚本。 但现在我必须通过添加“start”:“node src/app.js”脚本来修改我的packege.json。 但是每当我运行命令(npm run start)时,它都会产生错误。
我试过“开始”:“节点 app.js”。 我已经正确检查了脚本的位置,它位于 src 文件夹中,但仍然无法正常工作。
{
"name": "src",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node src/app.js" // here I declare the start
},
此脚本必须启动服务器
你应该只需要运行npm start
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.