skip to Main Content

npm i drizzle-orm postgres
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"^18.2.0" from [email protected]
npm ERR! node_modules/next
npm ERR! next@"14.2.3" from the root project
npm ERR! peer react@"^18.3.1" from [email protected]
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"^18.2.0" from [email protected]
npm ERR! node_modules/next
npm ERR! next@"14.2.3" from the root project
npm ERR! react-dom@"^18" from the root project
npm ERR! 2 more (styled-jsx, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! drizzle-orm@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"18.2.0" from [email protected]
npm ERR! node_modules/react-native
npm ERR! peer react-native@"
" from @op-engineering/[email protected]
npm ERR! node_modules/@op-engineering/op-sqlite
npm ERR! peerOptional @op-engineering/op-sqlite@">=2" from [email protected]
npm ERR! node_modules/drizzle-orm
npm ERR! drizzle-orm@"*" 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!
npm ERR! For a full report see:
npm ERR! C:UsersAimableAppDataLocalnpm-cache_logs2024-05-01T06_29_32_052Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:UsersAimableAppDataLocalnpm-cache_logs2024-05-01T06_29_32_052Z-debug-0.log

I was expecting it to be installed but I got the error

2

Answers


  1. Could be an issue with Drizzle running behind a version. Try adding/changing the following in package.json and doing an npm i

        "drizzle-orm": "^0.30.9",
        "react": "^18.3.1",
        "react-dom": "^18.3.1"
    

    It’s likely you have "react": "^18" in the package.json right now.

    Login or Signup to reply.
  2. I solved updating all the dependences running

    npm update --save
    npm update --save-dev
    

    then

    npm install --save drizzle-orm
    

    That will update the package.json with

      "dependencies": {
        "drizzle-orm": "^0.30.10",
        "next": "14.2.3",
        "next-auth": "^4.24.7",
        "react": "^18.3.1",
        "react-dom": "^18.3.1"
      },
      "devDependencies": {
        "@types/node": "^20.12.8",
        "@types/react": "^18.3.1",
        "@types/react-dom": "^18.3.0",
        "drizzle-kit": "^0.20.17",
        "eslint": "^8.57.0",
        "eslint-config-next": "14.2.3",
        "postcss": "^8.4.38",
        "tailwindcss": "^3.4.3",
        "typescript": "^5.4.5"
      }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search