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

Prisma generate on windows using deno fails with "Unsupported 16-bit Application" error. #19544

Open
konuch opened this issue Jun 18, 2023 · 5 comments

Comments

@konuch
Copy link

konuch commented Jun 18, 2023

When I try to generate and use prisma on Windows following the official manual at https://deno.com/[email protected]/node/how_to_with_npm/prisma I end up with following error on windows.

image

I used following command: deno run -A npm:prisma generate --data-proxy

Environment:

Deno:
deno 1.34.3 (release, x86_64-pc-windows-msvc)
v8 11.5.150.2
typescript 5.0.4

Windows:
Edition Windows 10 Enterprise
Version 22H2
Installed on ‎4. ‎11. ‎2021
OS build 19045.3086

@janpio
Copy link

janpio commented Jul 8, 2023

(Prisma here)
Can you try to use Prisma via Node.js and see if you get the same error?
If so, please to report this in https://github.com/prisma/prisma/issues

@janpio
Copy link

janpio commented Aug 8, 2023

Funny enough I just got a similar error message:
image

I have no idea what exactly happened, besides that I updated the Prisma version that Deno was using with this, it downloaded the engine files, and then ran into this error.

@janpio
Copy link

janpio commented Aug 8, 2023

Probably related to this, this output:

C:\Users\Jan\Documents\throwaway\20572\broken\fresh-project>deno run --reload=npm:prisma npm:prisma -v
✅ Granted all read access.
✅ Granted all sys access.
✅ Granted all env access.
✅ Granted all write access.
✅ Granted all net access.
Environment variables loaded from .env
✅ Granted all ffi access.
✅ Granted all run access.
Error: Unable to require(`C:\Users\Jan\AppData\Local\deno\npm\registry.npmjs.org\@prisma\engines\5.1.1\query_engine-windows.dll.node`).
The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: LoadLibraryExW failed
    at loadLibrary (file:///C:/Users/Jan/AppData/Local/deno/npm/registry.npmjs.org/prisma/5.1.1/build/index.js:85526:11)
    at getEngineVersion (file:///C:/Users/Jan/AppData/Local/deno/npm/registry.npmjs.org/prisma/5.1.1/build/index.js:85539:16)
    at eventLoopTick (ext:core/01_core.js:183:11)
Error: Command failed: C:\Users\Jan\AppData\Local\deno\npm\registry.npmjs.org\@prisma\engines\5.1.1\schema-engine-windows.exe --version
Failed to spawn: C:\Users\Jan\AppData\Local\deno\npm\registry.npmjs.org\@prisma\engines\5.1.1\schema-engine-windows.exe: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher. (os error 216)
    at spawnChildInner (ext:runtime/40_process.js:162:17)
    at spawnChild (ext:runtime/40_process.js:182:10)
    at Command.spawn (ext:runtime/40_process.js:440:12)
    at new ChildProcess (ext:deno_node/internal/child_process.ts:110:16)
    at Object.spawn (node:child_process:104:12)
    at execa8 (file:///C:/Users/Jan/AppData/Local/deno/npm/registry.npmjs.org/prisma/5.1.1/build/index.js:2821:33)
    at getEngineVersion (file:///C:/Users/Jan/AppData/Local/deno/npm/registry.npmjs.org/prisma/5.1.1/build/index.js:85542:56)
    at eventLoopTick (ext:core/01_core.js:183:11) {
  originalMessage: "Failed to spawn: C:\\Users\\Jan\\AppData\\Local\\deno\\npm\\registry.npmjs.org\\@prisma\\engines\\5.1.1\\schema"... 198 more characters,
  shortMessage: "Command failed: C:\\Users\\Jan\\AppData\\Local\\deno\\npm\\registry.npmjs.org\\@prisma\\engines\\5.1.1\\schema-"... 327 more characters,
  command: "C:\\Users\\Jan\\AppData\\Local\\deno\\npm\\registry.npmjs.org\\@prisma\\engines\\5.1.1\\schema-engine-windows.e"... 12 more characters,
  escapedCommand: '"C:\\Users\\Jan\\AppData\\Local\\deno\\npm\\registry.npmjs.org\\@prisma\\engines\\5.1.1\\schema-engine-windows.'... 14 more characters,
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
prisma                  : 5.1.1
@prisma/client          : Not found
Current platform        : windows
Query Engine (Node-API) : E_CANNOT_RESOLVE_VERSION (at ..\..\..\..\..\AppData\Local\deno\npm\registry.npmjs.org\@prisma\engines\5.1.1\query_engine-windows.dll.node)
Schema Engine           : E_CANNOT_RESOLVE_VERSION (at ..\..\..\..\..\AppData\Local\deno\npm\registry.npmjs.org\@prisma\engines\5.1.1\schema-engine-windows.exe)
Schema Wasm             : @prisma/prisma-schema-wasm 5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e
Default Engines Hash    : 6a3747c37ff169c90047725a05a6ef02e32ac97e
Studio                  : 0.492.0
Warning: Not implemented: ChildProcess.prototype.disconnect

@kt3k
Copy link
Member

kt3k commented Nov 24, 2023

@konuch We assume this has been fixed in #21297. Could you try your steps again with Deno v1.38.3?

@janpio
Copy link

janpio commented Nov 24, 2023

For me it is indeed fixed now, or at least I could not trigger it any more. Nice.

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

3 participants