nodejs 使用 leveldb

安装模块

1
2
3
	npm install levelup leveldown --save
```
报错信息:
sh: 1: node-pre-gyp: Permission denied
1
2

解决

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.