安装npm软件包时,我可以将unsafe-perm
设置为true
吗?
npm-pkgs:
npm.installed:
- names:
- composer-cli
- generator-hyperledger-composer
原因是我在尝试安装某些软件包时遇到了权限问题:
gyp WARN EACCES用户“root”无权访问dev dir“/usr/lib/node_modules/composer-cli/node_modules/pkcs11js/.node-gyp/8.9.3”
答案 0 :(得分:0)
是的,您可以使用env vars NpmDoc,SaltNpmDoc
npm-pkgs:
npm.installed:
- names:
- composer-cli
- generator-hyperledger-composer
- env:
- npm_config_unsafe_perm: "true"