npm中Error: could not get uid/gid问题的解决方法

在Docker中运行npm出现Error: could not get uid/gid的问题 但是通过设置unsafe-perm true 可以解决这个问题,不可思议。



npm config set unsafe-perm true

其他可以用的npm配置 # 关闭安全证书检查



npm config set unsafe-perm true

关闭强制SSL



npm config set strict-ssl false

更改npm源



npm config set registry https://registry.npm.taobao.org

#设置代理



# socks5 proxy
npm config set proxy http://xx@xx.com:xxxx 
# http proxy
npm config set https-proxy=http://xx@xx.com:xxxx

参考 http://www.cnblogs.com/liyongjian5179/p/9884944.html