samedi 28 février 2015

NodeJS unsafe-perm not working on package.json


I'm trying to run a npm install command with a preinstall script at my package.json. I know it's antipattern but I need to run some scripts as root.


It's working fine by adding a .npmrc file containing unsafe-perm = true to my root directory. But it's not working by add a config property in my package.json file:



{
"name": "foo",
"version": "1.4.4",
"config": {
"unsafe-perm":true
},
"scripts" : {
"preinstall" : "npm install -g bower"
}
}
// It is not working


According with NPM config docs it's ok adding this property in my package file. I want to understand why it's not working.





Aucun commentaire:

Enregistrer un commentaire