Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

360
Views
.node is not a valid Win32 application

On a Window 10 Home (on x64 bit), I tried running the following command on a Command Prompt:

node index.js

The error was the following:

C:\Users\cooldudeasateen\OneDrive\Coding\sil\node_modules\bindings\bindings.js:121 throw e; ^

Error: \?\C:\Users\cooldudeasateen\OneDrive\Coding\sil\node_modules\better-sqlite3\build\Release\better_sqlite3.node is not a valid Win32 application. \?\C:\Users\humay\OneDrive\Coding\sil\node_modules\better-sqlite3\build\Release\better_sqlite3.node at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18) at bindings (C:\Users\cooldudeasateen\OneDrive\Coding\sil\node_modules\bindings\bindings.js:112:48) at Object. (C:\Users\cooldudeasateen\OneDrive\Coding\sil\node_modules\better-sqlite3\lib\database.js:9:24) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18) at Object. (C:\Users\cooldudeasateen\OneDrive\Coding\sil\node_modules\better-sqlite3\lib\index.js:2:18) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) { code: 'ERR_DLOPEN_FAILED' }

I'm using the following Node version: v16.6.2

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Now I don't need help, the problem was that I installed x86 instead of x64, which was an honest mistake.

How did I know that I made this mistake? Well, honestly, I looked at other files of other version of Nodejs, and it ended in x64 instead of x86. Honestly, it was my mistake and I should've looked at them before installing new Nodejs version.

about 4 years ago · Juan Pablo Isaza Report

0

Many node modules are just JavaScript and are portable across systems. Some, however, contain native compiled code. The SQLite library you are using is not 'pure JavaScript' and relies on a binary.

When you npm install-ed it installed a binary for the system you were using at that time, for example, you were on a Mac. The better_sqlite3.node file was for that specific operating system.

You then opened this project on a different computer but also copied over the node_modules directory. Just like how you can't run .app files on Windows or (usually) .exe on Linux, this binary is not compatible with your OS. Removing and then re-installing the SQLite library will install a Windows-compatible binary.

Since your project is in a OneDrive folder, it might be that you are switching between operating systems. That could make this process tedious. One workaround would be to install the SQLite module globally, but that has some drawbacks.

require() will look not just through the current directory, but also recursively directories above it (eg ...\OneDrive\Coding\sil, then ...\OneDrive\Coding, then ...\OneDrive), before checking the global directory.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!