我无法将我的文件/repo推送到heroku,它给出如下错误
$ git push -f heroku main
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: -----> Build
remote: Running heroku-postbuild
remote: > ecommerce@1.0.0 heroku-postbuild
remote: > NPM_CONFIG_PRODUCTION=false && npm install --prefix frontend && npm run build --prefix frontend
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
是的,在我的包裹里。我已经在引擎部分
提到了node和npm的版本。请任何人帮助为什么我不能推在heroku
如果您使用纱:
git rm yarn.lock
git push heroku master
如果你使用npm:
git rm package-lock.json
git push heroku master
git push heroku master
设置Heroku堆栈。在本例中为heroku-20heroku stack:set heroku-20
然后把