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

postinstall problem with npx prisma db push #285

Open
binary64 opened this issue Apr 24, 2024 · 4 comments
Open

postinstall problem with npx prisma db push #285

binary64 opened this issue Apr 24, 2024 · 4 comments

Comments

@binary64
Copy link

Hi,

I have @graphql-debugger/trace-schema installed in my project. But when I do yarn install I get this during the "Building fresh packages..." stage:

error /home/user/monorepo/node_modules/@graphql-debugger/data-access: Command failed.
Exit code: 1
Command: npx prisma generate && npx prisma db push
Arguments: 
Directory: /home/user/monorepo/node_modules/@graphql-debugger/data-access

However this is actually running prisma generate against my own schema, which is defined in my root package.json under the prisma > schema keys. And then I get error: Environment variable not found: DATABASE_URL..

If I do a yarn why I get

$ yarn why @graphql-debugger/data-access
yarn why v1.22.19
[1/4] Why do we have the module "@graphql-debugger/data-access"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@graphql-debugger/[email protected]"
info Reasons this module exists
   - "@graphql-debugger#trace-schema#@graphql-debugger#utils" depends on it
   - Hoisted from "@graphql-debugger#trace-schema#@graphql-debugger#utils#@graphql-debugger#data-access"
   - Hoisted from "graphql-debugger#@graphql-debugger#backend#@graphql-debugger#adapter-sqlite#@graphql-debugger#data-access"
info Disk size without dependencies: "114.06MB"
info Disk size with unique dependencies: "158.89MB"
info Disk size with transitive dependencies: "224.26MB"
info Number of shared dependencies: 104

But I am not using the sqlite adapter, I'm sending to OpenTelemetery.

Many thanks for this

@danstarns
Copy link
Member

It could be an issue in how we spawn the db for debugger in your node modules dir.

See the postinstall script

We are looking into a fix for you, thank you for reporting.

@danstarns
Copy link
Member

danstarns commented Apr 26, 2024

@binary64 can you share your package.json file? You might not need data access installed

@binary64
Copy link
Author

I searched for "graphql-debugger" and get 2 hits:

    "graphql-debugger": "0.0.0-alpha.99",
    "@graphql-debugger/trace-schema": "0.0.0-alpha.99",

@danstarns
Copy link
Member

danstarns commented Apr 27, 2024

I searched for "graphql-debugger" and get 2 hits:

    "graphql-debugger": "0.0.0-alpha.99",
    "@graphql-debugger/trace-schema": "0.0.0-alpha.99",

Its graphql-debugger that depends on the SQL lite adapter, you can remove it, and if you wish to use the debugger UI locally use docker - this way you wont get this conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants