baudehlo / node-fs-ext

Extras missing from node's fs module
MIT License
101 stars 45 forks source link

Compiled against a different Node.js version using NODE_MODULE_VERSION xx #105

Closed justanotheranonymoususer closed 3 years ago

justanotheranonymoususer commented 3 years ago

I'm trying to use the module as part of a vscode extension, but I'm getting the following error:

Activating extension 'xxx' failed: The module '\?\c:\xxx\node_modules\fs-ext\build\Release\fs-ext.node' was compiled against a different Node.js version using NODE_MODULE_VERSION xx. This version of Node.js requires NODE_MODULE_VERSION 89. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install)

image

How can I make it work? I tried installing different versions of node, but there's no version I found for which NODE_MODULE_VERSION is 89, it's not in the table here.

Note that I'm already using at least one module with native code: https://github.com/simonbuchan/native-reg, and didn't have issues with it at all.

justanotheranonymoususer commented 3 years ago

I solved it by using electron-rebuild. Still, it would be nice to have a solution like native-reg uses to avoid running electron-rebuild after each update.