Skip to content

Prisma2 dev 'cannot destructure property "dmmf"' #999

Closed

Description

@BiscuiTech

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

Activity

  1. BiscuiTech commented on Nov 26, 2019

    @BiscuiTech
    Author

    The stack trace (of the Gist) seems to correspond to the same trace as this error #919.

  2. pantharshit00 commented on Nov 27, 2019

    @pantharshit00
    Contributor

    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
    
  3. added
    bug/0-unknown
    kind/bug
    on Nov 27, 2019
  4. pantharshit00 commented on Nov 27, 2019

    @pantharshit00
    Contributor

    Update: I am able to reproduce this on windows with the latest alpha: [email protected], binary version: 6159bf3

    image

    I will check on mac as well with the latest alpha.

  5. added
    bug/2-confirmed
    and removed
    bug/0-unknown
    on Nov 27, 2019
  6. pantharshit00 commented on Nov 27, 2019

    @pantharshit00
    Contributor

    I am unable to reproduce this on mac though

  7. tmfprlt1234 commented on Nov 27, 2019

    @tmfprlt1234

    Update: I am able to reproduce this on windows with the latest alpha: [email protected], binary version: 6159bf3

    image

    I will check on mac as well with the latest alpha.

    i also installed prisma2@alpha, but not changed, at vmware - centos 7, postgres

  8. kripod commented on Nov 27, 2019

    @kripod
    Contributor

    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.

  9. BiscuiTech commented on Nov 27, 2019

    @BiscuiTech
    Author

    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

  10. CaptainChemist commented on Nov 27, 2019

    @CaptainChemist

    I'm having this exact issue when trying to run within a docker environment. Here's a repo, it is the prisma2 hello starter where I added a Dockerfile and docker-compose.yml. In this case, I'm using npx as well as prisma v17.1 and photon v17.1 packages added to the package.json

    https://github.com/CaptainChemist/prisma2-17.1-enoent-err

    If you download the project and then run docker-compose build followed by docker-compose up the backend and studio containers both have the query-engine-debian-openssl-1.1.x file. For completeness, in order to get into those containers you have to run one of the following from the command line after you do a docker-compose up:
    docker exec -it backend bash
    docker exec -it studio bash

    The problem is that when I run prisma2 dev that the docker-compose output has an error: Failed to generate Photon client: Error: Error: Command failed with ENOENT: /app/node_modules/prisma2/query-engine-linux-glibc-libssl1.1.0 cli --dmmf

    I'm not sure why that is looking for a different query engine. In any case, hopefully running in a docker container will allow people on different platforms to have the same environment, but that's interesting that people are seeing the same issue outside of debian docker instances.

    Update- I get the same behavior when I install prisma2 globally and when I install prisma2 locally and use npx.

    @pantharshit00 I see the same behavior that you were seeing where this works great on my mac when I'm outside the docker environment.

  11. pantharshit00 commented on Nov 27, 2019

    @pantharshit00
    Contributor

    I can confirm this on linux, see #993 (comment)

  12. timsuchanek commented on Nov 28, 2019

    @timsuchanek
    Contributor

    Thanks a lot for your input everyone! We just released a new alpha, which should fix this issue in the prisma2 dev command.
    Please let me know, how it goes for you :)

  13. tmfprlt1234 commented on Nov 28, 2019

    @tmfprlt1234

    i updated new to new alpha, so i cant see this issue anymore.
    but when i open localhost:5555 in my browser(chrome,ie) it seems like this ->
    image

    image

    image

  14. timsuchanek commented on Nov 28, 2019

    @timsuchanek
    Contributor

    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.

  15. BiscuiTech commented on Nov 28, 2019

    @BiscuiTech
    Author

    I just updated and it seems that the original issue was fixed. But now I have this issue on my localhost db connection:
    image

    It comes from a "failedCalculatedSteps" file the prisma framework generated on the error.

  16. janpio commented on Nov 28, 2019

    @janpio
    Contributor

    @BiscuiTech Please open a new issue and someone will take a look into reproducing this. Thanks.

  17. added this to the Preview 18 milestone on Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug/2-confirmed

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions