I am trying to deploy my app onto heroku, yet I receive a build erorr where it fails to install the dependencies using npm install. Is there anyway I can install with "legacy-peer-deps"?
Thank you so much...
I tried editing my procifile file with the following contents in it
web: npm install --legacy-peer-deps
web: npm start
Ideally, you should resolve the underlying dependency issue so your application works without this option. But you should be able to configure it by setting environment variable ("config var" in Heroku-speak).
I believe the legacy-peer-deps
setting will do the trick:
heroku config:set NPM_CONFIG_LEGACY_PEER_DEPS=true
Then you'll need to redeploy.
Alternatively, you could add an .npmrc
file to your project:
legacy-peer-deps = true
Commit it, then redeploy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With