我试图在heroku上部署一个带有文件夹的nodejs应用程序。我有一个heroku-postbuild脚本,它应该是cd到客户端,然后安装依赖项,然后构建。
我已经证实,如果通过终端手动完成,这是完美的,但由于某种原因,当我推送到heroku时,客户端文件夹似乎从未真正构建过。
下面是日志输出:
Installing dependencies
remote: Installing node modules (package.json)
remote: audited 216 packages in 0.969s
remote:
remote: 21 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Build
remote: Running heroku-postbuild
remote:
remote: > chessalong2api@1.0.0 heroku-postbuild
/tmp/build_dk354b8k
remote: > cd chessalong2 && npm install && npm run build
remote:
remote: audited 216 packages in 1.083s
remote:
remote: 21 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 0 vulnerabilities
为什么在进入客户端之前和之后安装的节点模块数量是相同的?我将此解释为heroku无法输入客户端文件夹("chessalong2“是客户端文件夹的名称)。
发布于 2022-01-07 06:37:53
您是否在git更改中添加了客户端文件夹??
https://stackoverflow.com/questions/70617217
复制相似问题