Clojurians
#lumo
<
2018-02-28
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

bmaddy19:02:55

Does anyone know how to get past this error?

cljs.user=> (def kexec (js/require "kexec"))
The module '/Users/bmaddy/[removed]/node_modules/kexec/build/Release/kexec.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Running npm install again doesn't seem to work. Is my npm version incompatible with the node version used by lumo? Context: I'm trying to use lumo to write scripts to help with devops tasks (ssh into a server, see what builds are available for deployment, view logs for a server, etc.). To do this I'd like to use some npm libs, including this one to replace the current process with a new one.

dehli20:02:32

I believe Lumo does require a specific version of node. I would try using nvm to bump your local version and run npm install again to see if it fixes it.

richiardiandrea20:02:05

Lumo is at version 9.2.0 iirc

richiardiandrea20:02:43

but it embeds node so I wonder why it is complaining

anmonteiro21:02:11

^ because NPM installs + compiles with 1 version of Node

anmonteiro21:02:14

and then Lumo has another

bmaddy21:02:36

I tried updating node/npm with npm i -g npm and npm i -g node, but that still didn't get me there. I don't really want to force other developers to mess around with node versions if it's this painful, so I think I'm going to try another route with this. I'll see if I can get node deps into a deps.edn file and run it like this

lumo -c `clj -Spath` myscript.cljs
We'll see how that goes. :slightly_smiling_face:

bmaddy21:02:31

Thanks for the help, all!

anmonteiro21:02:13

Node.js just needs to be the same version that Lumo uses

anmonteiro21:02:33

I’m pretty sure npm install node doesn’t do what you think it does

bmaddy21:02:25

Yeah, it seems it doesn't... :confused:

richiardiandrea21:02:12

Probably nvm could help with the versions

bmaddy21:02:18

Yeah, I'm sure it would. I'm hoping to find a way to do it without making other devs install yet another tool. Currently, on our project we all have to install and configure clojure/clojurescript, datomic, rabbitmq, wkhtmltodpf, python, sassc, and ansible. I know that's not a ton of stuff, but I'm trying to write up this little deployment tool that already might be a bit of a tough sell to the team and more dependencies will make it harder. I'll probably try a few more things then fall back to nvm. Thanks again for the help everyone.

noisesmith21:02:30

@bmaddy sometimes maintaining an official "dev vm" with everything set up to go is worth it

richiardiandrea21:02:46

@bmaddy the problem is that the package you have chosen needs to be compiled if I understand correctly, that is why you either compile it with 9.2.0 or you downgrade lumo (compiling it from the repo, it is a simple line change).

richiardiandrea21:02:59

standard js packages usually run ootb

bmaddy22:02:20

@noisesmith Yeah, a "dev vm" would be nice. It'll probably be a while before we get around to that though. @richiardiandrea Cool, thanks. Nice to know that the non-compiling packages just work. :slightly_smiling_face: