npm/grunt: 是否可以在没有 npm 的情况下安装 grunt?

npm/grunt: is it possible to install grunt without npm?

我的企业代理系统有很多问题

我正在使用 npm config set 更改参数,更改变量代理和 http-proxy。

我在我的 .npmrc 中安装了下一行

npm config set proxy http://my_user:my_password@10.3.12.130:8080 -g
npm config set https-proxy http://my_user:my_password@10.3.12.130:8080 -g

我的想法是尝试在不使用 npm 的情况下在 VS2012 中安装 grunt,也许像 nuget。

可能吗?

我在使用 npm install -g grunt-cli:

时收到此错误页面

不,不可能。

这是来自Grunt getting started guide:

Grunt and Grunt plugins are installed and managed via npm, the Node.js package manager. Grunt 0.4.x requires stable Node.js versions >= 0.8.0. Odd version numbers of Node.js are considered unstable development versions.

是的,这是可能的,如果您唯一的问题是代理或防火墙,但您可以在 node.js 环境中下载 g运行t 和 运行 node.js 环境然后从 github.

下载它

您可以下载也在 github 上发布的任何 npm 包,然后手动将其复制到您的 node_modules 文件夹。请注意,这些包可能有自己的依赖关系。所以这意味着你应该 运行 npm install 在那些下载的文件夹中,如果它不起作用,请递归地手动为每个依赖项执行它,直到你完成。