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
pnpm: Can not prisma generate
when @prisma/client
is not installed in project
#9848
Comments
I'm having the same issues with npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! Tracker "idealTree:inflate:" already exists
npm ERR! A complete log of this run can be found in:
npm ERR! /path/to/.npm/_logs/2021-10-20T04_24_23_448Z-debug.log
Error: Command failed with exit code 1: npm install -D prisma@3.2.1 |
I switched to |
You're right but too bad to rollback to node14... |
Oh yes I just figured it out. You have to add @prisma/client too in dependencies at the root of your workspace if this is the place where you run prisma otherwise it tries to install it and fail |
The missing Can you please repeat the exact Npm and Node versions you are having these problems? Hopefully we can reproduce with that information and investigate a fix. |
I'm trying to create a docker image with pnpm and prisma, and I'm running into the implicit creation of a I have a Docker based reproduction: FROM node:17-alpine
WORKDIR /app
COPY prisma prisma
RUN npm i -g pnpm
RUN pnpm add prisma @prisma/client
RUN pnpm i -P
RUN rm -rf node_modules
RUN pnpm i -P The trick is that there must be a $ docker build --tag repro .
$ docker run -it repro sh
/app $ ls
node_modules package-lock.json package.json pnpm-lock.yaml prisma I'm trying to create a small image for production, running This is a terminal example of what happens in my own build process: /app $ ls
package.json pnpm-lock.yaml prisma dist
/app $ pnpm install --prod
...
node_modules/.pnpm/@prisma+client@3.3.0_prisma@3.3.0/node_modules/@prisma/client: Running postinstall script, done in 1m 4.6s
# This step takes a while, but with no output
...
/app $ ls
node_modules package-lock.json package.json pnpm-lock.yaml prisma |
I can confirm that Prisma doesn't seem to detect pnpm and tries to install |
Running Edit: Actually, installing Image analysis
|
@MarcusCemes to make things reproducible and have everything in lockfile, you can add the same versions of |
@aqrln That was my original intention, and how I believe it should work. But as I stated above, the reason I'm doing that nasty extra step is because it doesn't seem to play nicely with pnpm. |
@MarcusCemes that sounds like a different issue, albeit one that I can't reproduce, unlike the original one in this thread. I feel like there might be some confusion about what happens here, though. |
prisma generate
when @prisma/client
is not installed in project
Another user hit this in this discussion: #12501 The minimal solution here is to only run |
I have a Dockerfile, and it doesn't help me to add prisma before pnpm install
this is package.json of shared-utils
|
Same here.. |
Hey folks, we have just improved our |
prisma 4.14.1 did not work
|
it fails when prisma was hosted to pnpm workspace root node_modules |
Hey @lake2, can you please open a new issue and giving us some level of reproduction, and maybe the errors you're seeing? Thanks. |
Did you create that issue Pierre asked for @lake2? |
It is not linked here, so probably not, unfortunately. Feel free to do so. |
Bug description
How to reproduce
Just add Prisma to pnpm workspace
Expected behavior
No response
Prisma information
package.json
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: