question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation error using Node 32-bit

See original GitHub issue

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

  1. From official Node.js site download and install Node 17.5.0 32-bit including build tools with Chocolatey on Windows 11 Pro x64
  2. mkdir hello-prisma
  3. cd hello-prisma
  4. npm init -y
  5. npm install prisma typescript ts-node @types/node --save-dev
  6. create tsconfig.json file
  7. npx prisma init
  8. 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".)
  9. 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:open
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
Nguyenbahacommented, Apr 13, 2022

If anyone has fixed this, please comment here.

3reactions
jl0zanocommented, May 19, 2022

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on installing Node.js windows 10 64bits - Stack Overflow
Installation went bad (because error and there should be some files in "C:\Program Files\nodejs\" after installation or it'll definitely not ...
Read more >
Could not install Node.js using .msi (Error 1609) - Super User
I'm trying to install Node.js 14.17.2 on my computer but I get the same error each time. But let me tell the full...
Read more >
Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >
Set up NodeJS on native Windows - Microsoft Learn
Install nvm-windows, node.js, and npm · To change the version of Node. · Verify which version of npm is installed with: npm --version...
Read more >
NodeJS - npm install errors on Windows - YouTube
NOTE: If you are using Windows 10, you will want to open an Administrator PowerShell (right-click and choose "Run as administrator").
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found