NODE_MODULE_VERSION issue


#1

Greetings! I have a Node.js Express app that uses scrypt via scrypt-for-humans and it builds fine on my Mac. I had been building fine on CircleCI but I decided to run with a newer version of node so I created a circle.yml which has this:

machine:
node:
version: 6.1.0

I’d like to use an even newer version of Node but I’m not sure when those will be available on CircleCI. In the meantime I’m testing with CircleCI’s latest version which has NODE_MODULE_VERSION 48. However, my error on CircleCI is implying the NODE_MODULE_VERSION is 46 which makes me wonder if CircleCI is reading the circle.yml version. Or does CircleCI lock the node version after the first time it builds my tests? How can I do a clean npm install and npm rebuild? Here’s the error:

module.js:568
return process.dlopen(module, path._makeLong(filename));
^

Error: Module version mismatch. Expected 48, got 46.
at Error (native)
at Object.Module._extensions…node (module.js:568:18)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object. (/home/ubuntu/admin/node_modules/scrypt/index.js:3:20)
at Module._compile (module.js:541:32)
at Object.Module._extensions…js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object. (/home/ubuntu/admin/node_modules/scrypt-for-humans/lib/scrypt-for-humans.js:3:10)


#2

So, I didn’t push to this repo for a couple of weeks and I just did and the CircleCI build worked, so I think my suspicion was right: you were caching something even though I tried to use the circle.yml to tell CircleCI to use a specific version of node (which should have built a correct version of scrypt again) but that wasn’t triggering the rebuild of scrypt. I’m guessing if I upgraded to a paid plan there’d be a way to force this (or just ask you guys to do it).


#3

Thanks for the update. Yes - we can manually delete caches on request for paid plans.

We do have a feature in the pipeline that will let you do this yourself. Please subscribe to our Announcements to be notified when new releases are made.


#4