确定一下npm config情况
npm config ls
npm config set registry="http://registry.npmjs.org"//设置npm源地址
在win7 64上用npm安装phantomjs时出现Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE错误的解决方法。
解决方案在stackoverflow上找到的,关掉strict-ssl即可,如下:
npm config set strict-ssl false
用完之后恢复:
npm config set strict-ssl true