I have a package.json in which some modules have to be installed globally,below is the part that i added below dependencies
"scripts": {
"preinstall": "npm i -g supervisor",
"preinstall": "npm i -g forever"
}
But when i ran npm install i got the 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 the modules to be installed locally are getting installed,but only gloal installation is throwing an error.I am stuck here any help will be much appreciated.
Put this in your package.json :
And install your module as
root
.Also I think that the switch
preferGlobal
: Documentation, is created for modules that prefer to be installed globally. You might want to change your program logic to use programaticallyforever
module.Install your modules locally and then execute them via the bin folder in the local
node_modules
directoryTo start your app execute