Wednesday, 17 May 2017

Tell node to use global packages

Situation: I want to tell my node to use global modules if local not found. my package.json works fine with local installed packages.

"scripts": {
    "build": "browserify -t vueify -t [ babelify --presets [ es2015 react ] ] -e script/dev/main.js -o script/prod/build.js",

But I dont want to install every time my dev packages. So I've installed all of this dev packages globally.

npm i babel-plugin-transform-runtime babel-preset-r....and so on..... -g

But when I tried to npm run build from my local dir my node yells on me - he cant find this modules localy. So, how I can tell my node to use global modules instead?



via Alicelf

No comments:

Post a Comment