prisma: Installation error using Node 32-bit
Bug description
I’m using Node 32-bit on Windows 11 Pro x64. I’m following the “Start from scratch” guide on your website. When I type npx prisma init I get the follow error:
Error: The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set engineType = "binary" in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)
I am unable to add engineType="binary" to my “schema.prisma” file because it doesn’t get generated. Even if I create the “schema.prisma” file and the “.env” file and add engineType="binary" to it, I still get the same error when running npx prisma generate
How to reproduce
Follow guide at : https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-postgres
- From official Node.js site download and install Node 17.5.0 32-bit including build tools with Chocolatey on Windows 11 Pro x64
- mkdir hello-prisma
- cd hello-prisma
- npm init -y
- npm install prisma typescript ts-node @types/node --save-dev
- create tsconfig.json file
- npx prisma init
- Error:
The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set engineType = "binary" in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".) - No “schema.prisma” or “.env” files are create.
Expected behavior
A new empty Prisma Node project should be created with a “schema.prisma” file and a “.env” file.
Prisma information
No schema file is create
Environment & setup
- OS: Windows 11 Pro x64 21H2
- Database: PostgreSQL
- Node.js version: v17.5.0 32-bit
Prisma Version
3.9.2
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 15 (4 by maintainers)
I was able to fix this by upgrading to 64 bit Node. For some reason I was using the 32 bit version. I tried using the env variables but they didn’t fix anything.
You can verify your node version by using this command:
node -p "process.arch"I went to the Node website, downloaded the 64 bit installer and installed it again. Didn’t have to remove the 32 bit version first or restart my computer after installing the 64 bit version which was nice. Hope this helps!
If anyone has fixed this, please comment here.
OK, cảm ơn bạn! Sự nhiệt tình của bạn. tôi trân trọng điều đó
Vào Th 6, 20 thg 5, 2022 vào lúc 05:54 Jaime Lozano < @.***> đã viết:
No creen que tiene que ver el tipo de sistema de 32bit ya que en uno de 64bit no hay ningún problema. Ya que en el mensaje de la terminal aparece así:
Ahh, that is a stupid cross dependency of
initthat we did not think about before. I can reproduce it with similar steps as you provided:mkdir 11781 && cd 11781npm init -y && npm install prismanpx prisma init:I can workaround it though by setting the env var:
set PRISMA_CLI_QUERY_ENGINE_TYPE=binary:What does your
schema.prismalook like that you created manually?The solution is to install Node 64bits… SOLVED
i dont know
Sorry, that was an internal note. We will have to build that Wasm module first 😃
Changing the wording of the error message unfortunately will break it in some of the other locations/variants, so we have a bit of a problem here. For now I am happy you have a workaround that works for you, and this issue works as documentation about that.
We’ll start working on that Wasm module I guess…