简体   繁体   English

npm / grunt:没有npm可以安装grunt吗?

[英]npm/grunt: is it possible to install grunt without npm?

I am having so much problems with the proxy system of my entertprise 我的企业代理系统遇到了很多问题

I was changing parameter using npm config set changing the variable proxy and http-proxy. 我正在使用npm配置集更改变量代理和http-proxy来更改参数。

I installed in my .npmrc next lines 我安装在我的.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

What I have in my mind it is try to install grunt in VS2012 without using npm, maybe like nuget. 我在脑海中想到的是尝试在不使用npm的情况下在VS2012中安装grunt,也许就像nuget一样。

Is it possible? 可能吗?

I am getting this error page when I am using npm install -g grunt-cli : 当我使用npm install -g grunt-cli时,我收到此错误页面:

在此输入图像描述

Yes it is possible, you can download grunt and run it in your node.js environment, if your only problem is proxy or firewall but you have working node.js environment then just download it from the github . 是的,有可能,您可以下载grunt并在您的node.js环境中运行它,如果您唯一的问题是代理或防火墙,但您有工作node.js环境,那么只需从github下载它。

You can download any npm package which is published also on the github and then copy it manually to you node_modules folder. 您可以下载在github上发布的任何npm包,然后手动将其复制到node_modules文件夹。 Just beware that those packages may have dependencies on their own. 请注意,这些包可能依赖于它们自己。 SO that means you should run npm install in those downloaded folders and if it doesn't work do it manually for every dependency recursively until you are finished. 这意味着您应该在这些下载的文件夹中运行npm install ,如果它不起作用,请手动为每个依赖项手动执行,直到完成为止。

No, it is not possible. 不,这是不可能的。

This is from the Grunt getting started guide : 这是来自Grunt入门指南

Grunt and Grunt plugins are installed and managed via npm, the Node.js package manager. Grunt和Grunt插件通过Node.js包管理器npm安装和管理。 Grunt 0.4.x requires stable Node.js versions >= 0.8.0. Grunt 0.4.x需要稳定的Node.js版本> = 0.8.0。 Odd version numbers of Node.js are considered unstable development versions. Node.js的奇数版本号被认为是不稳定的开发版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM