lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
2018-02-28T19:48:55.000437Z

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.

dehli 2018-02-28T20:19:32.000109Z

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.

richiardiandrea 2018-02-28T20:51:05.000099Z

Lumo is at version 9.2.0 iirc

richiardiandrea 2018-02-28T20:51:43.000073Z

but it embeds node so I wonder why it is complaining

anmonteiro 2018-02-28T21:07:11.000071Z

^ because NPM installs + compiles with 1 version of Node

anmonteiro 2018-02-28T21:07:14.000168Z

and then Lumo has another

2018-02-28T21:16:36.000358Z

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. 🙂

2018-02-28T21:17:31.000663Z

Thanks for the help, all!

anmonteiro 2018-02-28T21:20:13.000405Z

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

anmonteiro 2018-02-28T21:20:18.000397Z

that’s it

anmonteiro 2018-02-28T21:20:33.000130Z

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

2018-02-28T21:23:25.000624Z

Yeah, it seems it doesn't... 😕

richiardiandrea 2018-02-28T21:28:12.000616Z

Probably nvm could help with the versions

2018-02-28T21:46:18.000666Z

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.

2018-02-28T21:54:30.000587Z

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

richiardiandrea 2018-02-28T21:58:46.000582Z

@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).

richiardiandrea 2018-02-28T21:58:59.000168Z

standard js packages usually run ootb

2018-02-28T22:14:20.000151Z

@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. 🙂