安装模块
1 | npm install levelup leveldown --save |
sh: 1: node-pre-gyp: Permission denied
1 |
|
npm config set unsafe-perm true
参考资料:
[https://docs.npmjs.com/misc/config#unsafe-perm](https://docs.npmjs.com/misc/config#unsafe-perm)
unsafe-perm
Default: false if running as root, true otherwise
Type: Boolean
Set to true to suppress the UID/GID switching when running package scripts. If set explicitly to false, then installing as a non-root user will fail.