0

I'm running the follow command to push my app on Heroku 'git push heroku master', but it returns:

-----> Installing binaries
       engines.node (package.json):  16.13.2
       engines.npm (package.json):   8.1.2
       
       Resolving node version 16.13.2...
       Downloading and installing node 16.13.2...
       npm 8.1.2 already installed with node
       
-----> Installing dependencies
       Installing node modules (package.json)
       npm ERR! code ERESOLVE
       npm ERR! ERESOLVE unable to resolve dependency tree
       npm ERR! 
       npm ERR! While resolving: paper-kit-2-angular@1.4.0
       npm ERR! Found: zone.js@0.11.3
       npm ERR! node_modules/zone.js
       npm ERR!   zone.js@"0.11.3" from the root project
       npm ERR! 
       npm ERR! Could not resolve dependency:
       npm ERR! peer zone.js@"~0.10.3" from @angular/core@11.0.4
       npm ERR! node_modules/@angular/core
       npm ERR!   @angular/core@"11.0.4" from the root project
       npm ERR!   peer @angular/core@"11.0.4" from @angular/common@11.0.4
       npm ERR!   node_modules/@angular/common
       npm ERR!     @angular/common@"11.0.4" from the root project
       npm ERR! 
       npm ERR! Fix the upstream dependency conflict, or retry
       npm ERR! this command with --force, or --legacy-peer-deps
       npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
       npm ERR! 
       npm ERR! See /tmp/npmcache.GEG9a/eresolve-report.txt for a full report.

Can anyone help me?

juzraai
  • 5,693
  • 8
  • 33
  • 47
Daniel Villar
  • 151
  • 1
  • 12
  • Does this answer your question? [Unable to resolve dependency tree error when installing npm packages](https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages) – juzraai Mar 16 '22 at 21:37
  • I've tryed it, running on my terminal works normally. The error ocurrs only when running "git push heroku master" – Daniel Villar Mar 16 '22 at 21:40

1 Answers1

0

Add your local "node" and "npm" version to package.json. For example I did:

  "engines": {
    "node": "16.15.1",
    "npm": "8.5.5"
  },

Apparently for me the "knex" module that I use is not compatible with newer npm (I am not sure).

Ehsan Paknejad
  • 154
  • 1
  • 7