Skip to content

[BUG] ERESOLVE unable to resolve dependency tree #3113

Closed
@abdusamadtv

Description

@abdusamadtv

Current Behavior:

Getting ERESOLVE unable to resolve dependency tree error while installing dependencies

Expected Behavior:

Successful installation of dependencies

Steps To Reproduce:

rm -rf node_modules package-lock.json

Environment:

  • OS: macOS Big Sur 11.2.3 (20D91)
  • Node: 16.0.0
  • npm: 7.10.0

Error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: pg@8.6.0
npm ERR! node_modules/pg
npm ERR!   pg@"^8.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional pg@"^7.18.2" from knex@0.20.15
npm ERR! node_modules/knex
npm ERR!   knex@"^0.20.14" from the root project
npm ERR!   peer knex@"<0.95.0" from objection@2.2.15
npm ERR!   node_modules/objection
npm ERR!     objection@"^2.1.3" 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 /Users/abdusamad/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/abdusamad/.npm/_logs/2021-04-21T05_30_29_351Z-debug.log

package.json

{
  "name": "",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "type": "commonjs",
  "engines": {
    "node": ">=12.16.2"
  },
  "scripts": {
    "migrate": "knex migrate:latest",
    "lint": "eslint ./ --fix",
    "dev": "nodemon src/index.js",
    "start": "node src/index.js",
    "postinstall": "link-module-alias",
    "preinstall": "command -v link-module-alias && link-module-alias clean || true"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "axios": "^0.19.2",
    "bcrypt": "^4.0.1",
    "cron": "^1.8.2",
    "currency-codes": "^2.1.0",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "iconv-lite": "^0.6.2",
    "jsonwebtoken": "^8.5.1",
    "knex": "^0.20.14",
    "link-module-alias": "^1.2.0",
    "moment": "^2.24.0",
    "mongoose": "^5.9.10",
    "morgan": "^1.10.0",
    "nodemon": "^2.0.3",
    "objection": "^2.1.3",
    "oracledb": "^4.2.0",
    "p-limit": "^3.0.2",
    "pg": "^8.0.2",
    "rotating-file-stream": "^2.1.3",
    "uuid": "^7.0.3",
    "xml2js": "^0.4.23"
  },
  "devDependencies": {
    "eslint": "^6.8.0",
    "eslint-config-prettier": "^6.10.1",
    "eslint-plugin-prettier": "^3.1.3",
    "prettier": "^2.0.4"
  },
  "_moduleAliases": {
    "~root": "./"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions