更新时间:2022-12-24 17:59:40
要运行构建步骤,您可以使用 npm脚本
来完成,如下所示:
To run your build step, you can do it with npm scripts
like this:
"scripts": {
"start": "node server.js",
"test": "mocha",
"postinstall": "node node_modules/gulp/bin/gulp build"
}
然后您的 Procfile
可以很简单-
web: npm start
就错误而言,很难说,因为我没有完整的错误要看.确保您的 server.js
文件在正确的位置,并且您有一个 package.json
文件,其中列出了所有依赖项.
As far as the error goes, it's hard to say because I don't have the full error to look at. Make sure your server.js
file is in the right spot, and you have a package.json
file that lists all of your dependencies.