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

[4.7] Migration engine exited #16545

Open
yovanoc opened this issue Nov 30, 2022 · 4 comments
Open

[4.7] Migration engine exited #16545

yovanoc opened this issue Nov 30, 2022 · 4 comments
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema.

Comments

@yovanoc
Copy link

yovanoc commented Nov 30, 2022

Bug description

Error with I run the migrate dev command (You should look on the Prisma version section, there is a hint on why this is happening I think)

  prisma:engines  binaries to download libquery-engine, migration-engine, introspection-engine, prisma-fmt +0ms
  prisma:loadEnv  project root found at /project/packages/database/package.json +0ms
  prisma:tryLoadEnv  Environment variables not found at null +0ms
  prisma:tryLoadEnv  Environment variables not found at undefined +0ms
  prisma:tryLoadEnv  No Environment variables loaded +0ms
  prisma:getConfig  Using getConfig Wasm +0ms
  prisma:getConfig  config data retrieved without errors in getConfig Wasm +24ms
  prisma:loadEnv  project root found at /project/packages/database/package.json +31ms
  prisma:tryLoadEnv  Environment variables not found at null +28ms
  prisma:tryLoadEnv  Environment variables not found at undefined +1ms
  prisma:tryLoadEnv  No Environment variables loaded +0ms
Prisma schema loaded from prisma/schema.prisma
  prisma:getConfig  Using getConfig Wasm +6ms
  prisma:getConfig  config data retrieved without errors in getConfig Wasm +12ms
Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:5432"

  prisma:getDMMF  Using CLI Query Engine (Node-API Library) at: /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/libquery_engine-darwin.dylib.node +0ms
  prisma:getDMMF  Loaded Node-API Library +10ms
  prisma:getDMMF  unserialized dmmf result ready +328ms
  prisma:getDMMF  dmmf retrieved without errors in getDmmfNodeAPI +108ms
  prisma:getConfig  Using getConfig Wasm +452ms
  prisma:getConfig  config data retrieved without errors in getConfig Wasm +10ms
  prisma:getConfig  Using getConfig Wasm +1ms
  prisma:getConfig  config data retrieved without errors in getConfig Wasm +11ms
Error: Error: Migration engine exited.
    at canConnectToDatabase (/project/node_modules/.pnpm/prisma@4.7.0/node_modules/prisma/build/index.js:92248:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ensureDatabaseExists (/project/node_modules/.pnpm/prisma@4.7.0/node_modules/prisma/build/index.js:92965:22)
    at async _MigrateDev.parse (/project/node_modules/.pnpm/prisma@4.7.0/node_modules/prisma/build/index.js:95212:26)
    at async main (/project/node_modules/.pnpm/prisma@4.7.0/node_modules/prisma/build/index.js:98523:18)
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

How to reproduce

Just update from 4.6 to 4.7

Expected behavior

No response

Prisma information

Can't share schema but will try to make a minimal reproduction

Environment & setup

  • OS: MacOS
  • Database:PostgreSQL
  • Node.js version: 19.2

Prisma Version

For sure related this give me an error:

Error: Command failed with EACCES: /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin --version
spawn /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin EACCES
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin',
  path: '/project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin',
  spawnargs: [ '--version' ],
  originalMessage: 'spawn /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin EACCES',
  shortMessage: 'Command failed with EACCES: /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin --version\n' +
    'spawn /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin EACCES',
  command: '/project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin --version',
  escapedCommand: '"/project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin" --version',
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
prisma                  : 4.7.0
@prisma/client          : 4.7.0
Current platform        : darwin
Query Engine (Node-API) : libquery-engine 39190b250ebc338586e25e6da45e5e783bc8a635 (at ../../node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine        : E_CANNOT_RESOLVE_VERSION (at ../../node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine    : introspection-core 39190b250ebc338586e25e6da45e5e783bc8a635 (at ../../node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary           : prisma-fmt 39190b250ebc338586e25e6da45e5e783bc8a635 (at ../../node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/prisma-fmt-darwin)
Format Wasm             : @prisma/prisma-fmt-wasm 4.7.0-74.39190b250ebc338586e25e6da45e5e783bc8a635
Default Engines Hash    : 39190b250ebc338586e25e6da45e5e783bc8a635

@yovanoc yovanoc added the kind/bug A reported bug. label Nov 30, 2022
@aqrln aqrln added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. team/schema Issue for team Schema. labels Nov 30, 2022
@janpio
Copy link
Member

janpio commented Nov 30, 2022

Does /project/node_modules/.pnpm/@prisma+engines@4.7.0/node_modules/@prisma/engines/migration-engine-darwin exist? Can you nuke your node_modules of the project and try to install the dependencies again and see if this still happens?

@yovanoc
Copy link
Author

yovanoc commented Nov 30, 2022

image

Yeah It exists but not executable. And I tried to do this cleaning thing multiple times :/

@janpio
Copy link
Member

janpio commented Nov 30, 2022

That sounds like a local permission problem then, not a general bug. Do you agree?
Does this also happen when you install the project in a new location?
If so, can you share the complete project setup with pnpm so we can reproduce?

@yovanoc
Copy link
Author

yovanoc commented Nov 30, 2022

No it only happen with 4.7, if I downgrade back to 4.6 its working like a charm. Unfortunately I can't share the repo but will try to make a minimal repro If I can then... hope you will find something

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/schema Issue for team Schema.
Projects
None yet
Development

No branches or pull requests

3 participants