Node-API library does not work on 32bit Node
See original GitHub issueVia Azure Functions Windows e2e tests @williamluke4 discovered that our Napi build does not work on 32 bit Node.
I can confirm this on Windows directly as well:
[2021-05-03T14:28:26.840Z] Worker process started and initialized.
[2021-05-03T14:28:26.857Z] Worker was unable to load function azure-function-win-e2e-test-2021-05-03-133402: 'Error: \\?\C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\node_modules\.prisma\client\query_engine_napi-windows.dll.node is not a valid Win32 application.
[2021-05-03T14:28:26.859Z] \\?\C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\node_modules\.prisma\client\query_engine_napi-windows.dll.node'
[2021-05-03T14:28:26.863Z] Worker failed to function id e5d13d4c-5182-407f-9838-920b085eef0e.
[2021-05-03T14:28:26.865Z] Result: Failure
Exception: Worker was unable to load function azure-function-win-e2e-test-2021-05-03-133402: 'Error: \\?\C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\node_modules\.prisma\client\query_engine_napi-windows.dll.node is not a valid Win32 application.
[2021-05-03T14:28:26.866Z] \\?\C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\node_modules\.prisma\client\query_engine_napi-windows.dll.node'
Stack: Error: \\?\C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\node_modules\.prisma\client\query_engine_napi-windows.dll.node is not a valid Win32 application.
[2021-05-03T14:28:26.868Z] \\?\C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\node_modules\.prisma\client\query_engine_napi-windows.dll.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\Jan\Documents\prisma2-e2e-tests\platforms-serverless\azure-functions-windows\azure-function-win-e2e-test-2021-05-03-133402\index.js:3:20)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14).
To get to this:
- Clone https://github.com/prisma/e2e-tests/tree/enable-napi-tests
- Set
PRISMA_FORCE_NAPI=true
- Run
yarn
inplatforms-servereless/azure-functions-windows
- Also run
yarn prisma generate
andyarn tsc
- Make sure you have a 32 bit Node installed, e.g.
nvm install 14.16.1 32
andnvm use 14.16.1 32
(uses https://github.com/coreybutler/nvm-windows) - Then run
yarn func start
and observe error above
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to fix npx prisma init error for node 32 - Stack Overflow
When I type npx prisma init I get the follow error: Error: The default query engine type (Node-API, "library") is currently not supported...
Read more >library not found or failed to load. Trying to use third-party library.
Hi, I am trying to use third-party API. I have placed the .dll file in system32 and sysWOW64 folder as well. I have...
Read more >Node-API | Node.js v19.3.0 Documentation
Although Node-API provides an ABI stability guarantee, other parts of Node.js do not, and any external libraries used from the addon may not....
Read more >How to Download & Install Node.js and NPM on Windows
1. Go to the site https://nodejs.org/en/download/ and download the necessary binary files. 2. Double click on the downloaded .msi file to start the...
Read more >canvas - npm
The minimum version of Node.js required is 6.0.0. Compiling. If you don't have a supported OS or processor architecture, or you use ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any update on running 32bit Node on Windows. I get the error
I did this and tried
npx prisma generate
again and still get the same error.Same answer as before, the error message includes the workaround. If that workaround does not work for you, open a new issue please.