【发布时间】:2021-09-07 00:08:06
【问题描述】:
无法构建 nodejs 项目 npm run build 不起作用,我也尝试过 nodemon 仍然无法做到。
应用程序在localhost:3000 中运行良好。
但在构建时它失败了
me@sf:~$ npm run build
> project@1.0.1 build
> start build
sh: 1: start: not found
package.json
"scripts": {
"test": "test",
"start": "node index.js",
"build": "start build"
},
【问题讨论】:
-
您是否试图从
build脚本中引用start脚本?这不是它的工作原理——build命令应该做什么? -
脚本中的
start build命令是什么? -
@DaveNewton 它应该构建项目。我以前也这样做过。
-
如何构建?什么?
build(start build中的那个)从何而来?什么是start(start build中的那个),它来自哪里? -
我不知道,只是在 azure 上部署失败。
标签: node.js express npm nodemon npm-build