Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma generate throws dependency error karma-chai #14816

Closed
aaly00 opened this issue Aug 15, 2022 · 3 comments · Fixed by #18646
Closed

Prisma generate throws dependency error karma-chai #14816

aaly00 opened this issue Aug 15, 2022 · 3 comments · Fixed by #18646
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. topic: pnpm
Milestone

Comments

@aaly00
Copy link

aaly00 commented Aug 15, 2022

Bug description

prisma generate throws a dep resolution error when you are using PNPM

My setup: Docker container

Docker image base: FROM node:18
Host: MacBook Pro 2021 M1 Pro

Running command from inside the container.

Here is what I tried:

  • Install as dev dep
  • Install as normal dep
  • Use pnpx
  • Use npx
root@64a9e9c2102a:/app# pnpx prisma generate 
.pnpm-store/v3/tmp/dlx-1446              |   +2 +
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /app/.pnpm-store/v3
  Virtual store is at:             .pnpm-store/v3/tmp/dlx-1446/node_modules/.pnpm
.pnpm-store/v3/tmp/dlx-1446              | Progress: resolved 2, reused 2, downloaded 0, added 2, done
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @eslint/eslintrc@1.3.0
npm WARN Found: peer eslint-plugin-jsdoc@">=22.1.0" from eslint-config-eslint@7.0.0
npm WARN node_modules/.pnpm/@eslint+eslintrc@1.3.0/node_modules/@eslint/eslintrc/node_modules/eslint-config-eslint
npm WARN   dev eslint-config-eslint@"^7.0.0" from @eslint/eslintrc@1.3.0
npm WARN   node_modules/.pnpm/@eslint+eslintrc@1.3.0/node_modules/@eslint/eslintrc
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-jsdoc@">=22.1.0" from eslint-config-eslint@7.0.0
npm WARN node_modules/.pnpm/@eslint+eslintrc@1.3.0/node_modules/@eslint/eslintrc/node_modules/eslint-config-eslint
npm WARN   dev eslint-config-eslint@"^7.0.0" from @eslint/eslintrc@1.3.0
npm WARN   node_modules/.pnpm/@eslint+eslintrc@1.3.0/node_modules/@eslint/eslintrc
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: accepts@1.3.8
npm WARN Found: peer eslint-plugin-import@">=2.18.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from accepts@1.3.8
npm WARN   node_modules/.pnpm/accepts@1.3.8/node_modules/accepts
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-import@">=2.18.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from accepts@1.3.8
npm WARN   node_modules/.pnpm/accepts@1.3.8/node_modules/accepts
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: accepts@1.3.8
npm WARN Found: peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from accepts@1.3.8
npm WARN   node_modules/.pnpm/accepts@1.3.8/node_modules/accepts
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from accepts@1.3.8
npm WARN   node_modules/.pnpm/accepts@1.3.8/node_modules/accepts
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: async-retry@1.3.3
npm WARN Found: peer eslint-plugin-import@"^2.22.1" from eslint-config-airbnb@18.2.1
npm WARN node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"18.2.1" from async-retry@1.3.3
npm WARN   node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-import@"^2.22.1" from eslint-config-airbnb@18.2.1
npm WARN node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"18.2.1" from async-retry@1.3.3
npm WARN   node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: async-retry@1.3.3
npm WARN Found: peer eslint-plugin-jsx-a11y@"^6.4.1" from eslint-config-airbnb@18.2.1
npm WARN node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"18.2.1" from async-retry@1.3.3
npm WARN   node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-jsx-a11y@"^6.4.1" from eslint-config-airbnb@18.2.1
npm WARN node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"18.2.1" from async-retry@1.3.3
npm WARN   node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: async-retry@1.3.3
npm WARN Found: peer eslint-plugin-react@"^7.21.5" from eslint-config-airbnb@18.2.1
npm WARN node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"18.2.1" from async-retry@1.3.3
npm WARN   node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-react@"^7.21.5" from eslint-config-airbnb@18.2.1
npm WARN node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"18.2.1" from async-retry@1.3.3
npm WARN   node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: body-parser@1.20.0
npm WARN Found: peer eslint-plugin-import@">=2.18.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from body-parser@1.20.0
npm WARN   node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-import@">=2.18.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from body-parser@1.20.0
npm WARN   node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: body-parser@1.20.0
npm WARN Found: peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from body-parser@1.20.0
npm WARN   node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@14.1.1
npm WARN node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"14.1.1" from body-parser@1.20.0
npm WARN   node_modules/.pnpm/body-parser@1.20.0/node_modules/body-parser
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: content-disposition@0.5.4
npm WARN Found: peer eslint-plugin-import@">=2.18.0" from eslint-config-standard@13.0.1
npm WARN node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"13.0.1" from content-disposition@0.5.4
npm WARN   node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-import@">=2.18.0" from eslint-config-standard@13.0.1
npm WARN node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"13.0.1" from content-disposition@0.5.4
npm WARN   node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: content-disposition@0.5.4
npm WARN Found: peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@13.0.1
npm WARN node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"13.0.1" from content-disposition@0.5.4
npm WARN   node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-standard@">=4.0.0" from eslint-config-standard@13.0.1
npm WARN node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/node_modules/eslint-config-standard
npm WARN   dev eslint-config-standard@"13.0.1" from content-disposition@0.5.4
npm WARN   node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: debug@2.6.9
npm ERR! Found: dev karma-chai@"^0.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev karma-chai@"^0.1.0" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-08-15T16_05_23_187Z-debug-0.log
Error: Command failed with exit code 1: npm install @prisma/client@4.2.1

How to reproduce

  1. Init prisma
  2. Setup DB connection
  3. Run npx prisma generate
  4. See error

Expected behavior

No response

Prisma information

NA

Environment & setup

  • OS: macOS 12.4
  • Database: PostgreSQL
  • Node.js version: v18.7.0

Prisma Version

root@64a9e9c2102a:/app# npx prisma -v
Environment variables loaded from .env
prisma                  : 4.2.1
@prisma/client          : Not found
Current platform        : linux-arm64-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/.pnpm/@prisma+engines@4.2.1/node_modules/@prisma/engines/libquery_engine-linux-arm64-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/.pnpm/@prisma+engines@4.2.1/node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-1.1.x)
Introspection Engine    : introspection-core 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/.pnpm/@prisma+engines@4.2.1/node_modules/@prisma/engines/introspection-engine-linux-arm64-openssl-1.1.x)
Format Binary           : prisma-fmt 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/.pnpm/@prisma+engines@4.2.1/node_modules/@prisma/engines/prisma-fmt-linux-arm64-openssl-1.1.x)
Default Engines Hash    : 2920a97877e12e055c1333079b8d19cee7f33826
Studio                  : 0.469.0
@aaly00 aaly00 added the kind/bug A reported bug. label Aug 15, 2022
@aaly00
Copy link
Author

aaly00 commented Aug 15, 2022

Seems that #13761 is a similar issue that's closed

@aaly00
Copy link
Author

aaly00 commented Aug 15, 2022

This issue #5340 figures out the cause behind the problem.
Running pnpm i @prisma/client fixes the problem if you're using pnpm

@do4gr do4gr added team/client Issue for team Client. bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Aug 17, 2022
@millsp millsp added this to the 4.13.0 milestone Apr 14, 2023
@millsp
Copy link
Member

millsp commented Apr 14, 2023

Hey folks, we have just improved our pnpm detection logic to fix this issue, and we will release this in our 4.13.0 release. That said, you can try it now by installing our dev version. npm install prisma@dev. Feedback welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. topic: pnpm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants