node.js - npm scripts won't execute
问题描述
I have set up a few projects with npm, and so far, running 'npm start'
in the terminal, or using the npm scripts panel in the VSCode explorer would run and start my apps.
However, the scripts simply don't seem to run anymore, I did no change to the project nor to the Node in my machine, and the problem isn't with my code, as starting my Vue app through the Vue User Interface will work just fine.
In the detail of what happens: I run npm start
(which is defined in package.json), the terminal will start the task, and then end with no explanation.
If anyone knows what the purpose of this could be...
解决方案
当您运行 npm start 时,它将根据 package.json 文件运行。在这种情况下,它将运行“电子”。我不确定那应该做什么。
启动脚本的一个示例是:
start: "npm run build && node server.js"
然后它会在你运行“npm start”时运行该脚本。
推荐阅读
- sql - 滚动日期范围内的 BigQuery 不同计数,列分区
- c# - Moq 与 LINQ 到实体投影
- c# - 如何实现一个只包含预定义内容但仍然可以编组的结构?
- python - Azure ML 环境的自定义 Docker 文件,其中包含 COPY 语句错误,COPY 失败:/path 没有这样的文件或目录
- ios - 如何在点击按钮时将 Tableview 单元格内的文本字段中的数据打印到控制台
- r - 使用条件聚合行
- fb-hydra - 使用 Hydra 从 Python 代码中可见的“overrides.yaml”的路径是什么
- javascript - 只交出一些额外的函数变量
- javascript - 使用 reactjs 中的道具从孩子传递数据
- javascript - 通过单击jquery中的外部按钮向上或向下移动表行时如何修复特定列值