[Pkg-javascript-devel] NPM: Cannot find module installed globally
Hi, with npm 1.4.21+ds-2 I'm not able to require module installed globally... See this: $ sudo npm install -g coffee-script /usr/local/bin/coffee - /usr/local/lib/node_modules/coffee-script/bin/coffee /usr/local/bin/cake - /usr/local/lib/node_modules/coffee-script/bin/cake coffee-script@1.8.0 /usr/local/lib/node_modules/coffee-script └── mkdirp@0.3.5 $ nodejs -e require('coffee-script'); module.js:340 throw err; ^ Error: Cannot find module 'coffee-script' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at [eval]:1:1 at Object.anonymous ([eval]-wrapper:6:22) at Module._compile (module.js:456:26) at evalScript (node.js:532:25) at startup (node.js:80:7) at node.js:902:3 Is this happening only to me? Leo. ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] NPM: Cannot find module installed globally
Le samedi 20 septembre 2014 à 19:44 +0200, Leo Iannacone a écrit : Hi, with npm 1.4.21+ds-2 I'm not able to require module installed globally... See this: $ sudo npm install -g coffee-script You might consider this a bug - i made this on purpose, so that modules installed by debian package are the only ones being globally installed. Here are the main reasons: * npm actually discourages npm install -g in favor of cd thismodule; npm link cd thatmodule; npm link thismodule * it would allow modules installed by npm to override silently modules installed as debian packages. In any case, such a feature should come as an option, enabled by installing npm-integration, like rubygems do. Jérémy. ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] NPM: Cannot find module installed globally
On Sat, Sep 20, 2014 at 7:33 PM, Jérémy Lal kapo...@melix.org wrote: * npm actually discourages npm install -g in favor of cd thismodule; npm link cd thatmodule; npm link thismodule I think npm encourages using `npm install` which would put dependencies in a local folder called node_modules and would generally discourage use of `npm link`, unless you are developing a module and using npm link to test it while you develop it. Even then, most people do not use npm link. ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel