prisma: Prisma2 dev 'cannot destructure property "dmmf"'

I am recently having this issue where running prisma2 dev seems to work fine. The interface at lh/5555 loads up but shows “getting things ready” for about 5 minutes. Then, this error happens: image

In the console, i get this: Failed to generate Photon client: Error: Error: Command failed with ENOENT: /home/biscuitech/.nvm/versions/node/v13.1.0/lib/node_modules/prisma2/query-engine-linux-glibc-libssl1.1.0 cli --dmmf spawn /home/biscuitech/.nvm/versions/node/v13.1.0/lib/node_modules/prisma2/query-engine-linux-glibc-libssl1.1.0 ENOENT I can’t seems to make prisma2 dev work.

Before trying prisma2 dev, I ran prisma2 lift save & up with sucess. But after running prisma2 dev, I have this error on lift up: https://gist.github.com/BiscuiTech/4fc7058b55379ed6fec13c2f6f8f107c

After trying prisma2 dev again, it crashes right away with this error:

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Thanks @tmfprlt1234! The big plus should be gone now in the latest alpha (369). We’ll do a patch release now including a fix for this! Let me know if it’s still an issue for you and I’ll reopen this issue.

Can you please all try this again with the latest preview(preview017)? The binary names that you have mentioned are referring to the old names so I think you are using an old version of Prisma 2.

If you on Linux, please use this command to install prisma2(if you don’t have nvm or similar tool or haven’t set the permission of npm global bin properly):

sudo npm install -g --unsafe-perm prisma2

I do have nvm. I’m on Win10 running 20H1 and WSL2. I’ll try cleaning the whole npm cache and reinstalling everything.

EDIT: So I reinstalled node & npm, cleaned the cache and reinstall using unsafe-perms: image

EDIT 2: I tried specifying the platform in the schema.prisma file like so: image

But the error persists. I checked the folder where the binary engine resides and it’s not there: image

I just encountered this while running yarn prisma2 dev on Windows 10 x64. The stack trace could hardly be caught, due to the interactive behavior of prisma2 dev constantly rewriting the entire screen.

image

The issue can be reproduced by cloning this repo, installing the dependencies and then running yarn generate in the server directory, followed by yarn develop or more specifically, yarn prisma2 develop.