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

Can not work on Windows #992

Open
MountainAndMorning opened this issue Jun 7, 2023 · 2 comments
Open

Can not work on Windows #992

MountainAndMorning opened this issue Jun 7, 2023 · 2 comments

Comments

@MountainAndMorning
Copy link

I followed the hello world example on Windows 10.
node -v
v18.16.0
npm -v
9.5.1

npm init neon cpu-count

cd cpu-count
npm install

node
require('.')

But got the error below:

(base) C:\Users\iridium\Documents\cpu-count>node
Welcome to Node.js v18.16.0.
Type ".help" for more information.

req
Request require

require('.')
Uncaught:
Error: \?\C:\Users\iridium\Documents\cpu-count\index.node is not a valid Win32 application.
\?\C:\Users\iridium\Documents\cpu-count\index.node
at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18) {
code: 'ERR_DLOPEN_FAILED'
}

I also try use the node-v14.16.0-x64 and the node-v16.13.0-x64 and also failed.

@kjvalencik
Copy link
Member

kjvalencik commented Jun 7, 2023

What version of Windows? What CPU architecture? Can you double check your default cargo target (rustup default)?

It seems like the module isn't targeting Windows.

@MountainAndMorning
Copy link
Author

Thanks for your help.
Windows 10 version 21H2
AMD Ryzen Threadripper 3970X 32-Core
I solved the problem by deleting the rust installed by the rust-1.70,0-i686-pc-windows-gpu installer and reinstall the rust by the rustup-init installer.

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

2 participants