【发布时间】:2013-11-14 14:40:03
【问题描述】:
npm 注册表再次关闭,导致 npm install 无法正常工作。
问题:我们如何使用npm 从 npm 镜像中拉取包?有推荐的 npm 镜像吗?
【问题讨论】:
标签: javascript node.js npm
npm 注册表再次关闭,导致 npm install 无法正常工作。
问题:我们如何使用npm 从 npm 镜像中拉取包?有推荐的 npm 镜像吗?
【问题讨论】:
标签: javascript node.js npm
使用 npm 镜像
npm set registry http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com
您可以稍后使用 npm set registry 重置它
npm set registry https://registry.npmjs.org/
然后正常使用:
npm install express
您还可以查看gist 了解有关上述解决方案的更多信息。
【讨论】:
Here is a Gist with what seems to be complete instructions for setting up a mirror, with a demo mirror/example.。不确定该人的镜像是否仍在运行,但提供的示例似乎很简单:
$ npm set registry http://domain.of.your.npm.mirror.com
【讨论】: