babashka / nbb

Scripting in Clojure on Node.js using SCI
Eclipse Public License 1.0
864 stars 52 forks source link

$NODE_PATH should automatically be on the classpath #98

Closed chr15m closed 3 years ago

chr15m commented 3 years ago

If NODE_PATH is set, Node will assume that as the node_modules path when doing require and import. User expectation is probably that this would be the same for nbb.

Example:

NODE_PATH="/home/piku/.piku/envs/sfxrpro/node_modules" nbb somescript.cljs
borkdude commented 3 years ago

Right now the classpath only affects loading .cljs files, not js files. NODE_PATH should affect loading JS libs. Please provide a more complete standalone repro so I can see that we are talking about the same thing.

chr15m commented 3 years ago

Yes, sorry, will do.

chr15m commented 3 years ago

Ok, this was an issue with my deployment environment, sorry for the noise.