Installation error using Node 32-bit
See original GitHub issueBug 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
If anyone has fixed this, please comment here.
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!