Package.json to install the global module

I have package.json in which some modules must be installed globally, below is the part that I added below the dependencies

"scripts": { "preinstall": "npm i -g supervisor", "preinstall": "npm i -g forever" } 

But when I ran npm install, I got an error as below

 npm WARN package.json aaa@0.0.0 No README.md file found! npm WARN cannot run in wd aaa@0.0.0 npm i -g forever (wd=/home/administrator/AAA) 

All modules that must be installed locally are installed, but only a gloomy installation throws an error. I'm stuck here, any help would be greatly appreciated.

+4
npm package node-modules
May 6 '13 at 7:10
source share
2 answers

Put this in your package.json package:

 "config":{ "unsafe-perm":true } 

And install your module as root .

I also think that the preferGlobal : switch: Documentation is created for modules that prefer to be installed globally. You might want to change your programming logic to use the forever software module.

+2
May 6 '13 at 9:00
source share

Install your modules locally and then run them through the bin folder in the local node_modules directory

 npm install -S forever ls node_modules/.bin/ 

To start the application, run

 node_modules/.bin/forever start app.js 
0
May 6, '13 at 15:24
source share



All Articles