Ask coding questions

← Back to all posts
I am getting an error that a module was compiled against a different node.js version.
JoshCrites (1)

Here is the full error. How do I resolve it?

Error: The module '/home/runner/zghsx9ruruf/node_modules/scrypt/build/Release/scrypt.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Commentshotnewtop
ContourRepl (2)

Hmmm... Those commands need to be ran in bash. Try opening the repl shell: Ctrl + Shift + S; and type 'npm rebuild' or 'npm install', hope I helped. If your still having issues, I have another go at figuring it out...

JoshCrites (1)

It still doesn't work. When was this updated to use node v12.16.1 rather than node v 10? @ContourRepl

ContourRepl (2)

@JoshCrites hmmm... I'm not sure. I think try that...

JoshCrites (1)

How can I change the default version of a REPL? @ContourRepl

ContourRepl (2)

@JoshCrites #Try this:
Make a file named .replit and put this code inside:
language = "[put wanted language here]" run = ""

JoshCrites (1)

it isn't clear how I can switch the node version in this file https://docs.repl.it/repls/dot-replit @ContourRepl

ContourRepl (2)

@JoshCrites well, that should change what the repl interface is. You'll probably have to create a new file with the updated node version...

JoshCrites (1)

ok, I don't see how to update the node version though...
@ContourRepl

ContourRepl (2)

@JoshCrites Hmmm... Well, there appears to only be one node.js file. Try doing it in a HTML, CSS, JS file

JoshCrites (1)

that wont work, this is a node.js script that is installing packages from npm @ContourRepl