使用NodeJS、GruntCLI遇到的问题
运行环境CMD
NODEJS版本v0.8.4 node --version
需求:需要用到Grunt的JS编译功能,各位别笑我。
使用代理
npm config set proxy http://ip:port
npm config set npaturl http://npat.npmjs.org/
安装完grunt-cli报错
> grunt
- grunt-cli: The grunt command line interface. (v0.1.13)
- Fatal error: Unable to find local grunt.
- If you're seeing this message, either a Gruntfile wasn't found or grunt
- hasn't been installed locally to your project. For more information about
- installing and configuring grunt, please see the Getting Started guide:
- http://gruntjs.com/getting-started
看文件意思是缺少Gruntfile或者项目里没有安装grunt,结果我上网搜不到准确结果。
下载到本地
>npm install grunt
>grunt
- >> Local Npm module "grunt-contrib-copy" not found. Is it installed?
- >> Local Npm module "grunt-contrib-concat" not found. Is it installed?
- >> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
- >> Local Npm module "grunt-css" not found. Is it installed?
- Warning: Task "concat" not found. Use --force to continue.
- Aborted due to warnings.
这些是Gruntfile.js中引用的,分别下载。ok
npm install grunt-contrib-copy
npm install grunt-contrib-concat
npm install grunt-contrib-uglify
npm install grunt-css
下载过程有版本号问题,需要单独下载 npm install name@version
转载 http://blog.csdn.net/phoenix2121/article/details/25910919
使用NodeJS、GruntCLI遇到的问题的更多相关文章
- nodeJS npm grunt grunt-cli
1.安装好nodeJS后 ,一般都会把npm也安装好的.nodeJs集成npm的,可通过在cmd 分别运行 node -v和 npm -v来查看他们的版本,假设显示可说明可继续以下的操作 2.想安装g ...
- grunt让Nodejs规范起来
Aug 17, 2013 Tags: gruntJavascriptnodejs Comments: 9 Comments grunt让Nodejs规范起来 从零开始nodejs系列文章,将介绍如何利 ...
- 安装完grunt和grunt-cli仍然无法识别grunt
如题: 在安装完grunt-cli和grunt之后,仍然不识别grunt. 反复确认是-g安装... 原因: 有可能是nodejs安装出现问题,到时npm的路径没有出现在环境变量里面. 把C:\Use ...
- ubuntu14.04下nodejs + npm + bower的安装、调试和部署
1. 简介 本文介绍ubuntu14.04下nodejs+npm+bower的安装.调试和部署 参考文档 https://docs.npmjs.com/getting-started https: ...
- Grunt-cli的执行过程以及Grunt加载原理
通过本篇你可以了解到: 1 grunt-cli的执行原理 2 nodeJS中模块的加载过程 Grunt-cli原理 grunt-cli其实也是Node模块,它可以帮助我们在控制台中直接运行grunt命 ...
- AngularJS+NodeJS环境搭建
需要安装的软件: node-v0.12.7-x64.msi python-2.7.10.amd64.msi Git-2.5.1-64-bit.exe (注意:Git安装时,需要选择的步骤) 安装位置 ...
- web前端开发中Nodejs、Grunt、npm等的介绍、使用
一.Nodejs的安装: Grunt和所有grunt插件都是基于nodejs来运行的,如果你的电脑上没有nodejs,就去安装吧.去 https://nodejs.org/ 上,点击页面中那个绿色.大 ...
- Nodejs in Visual Studio Code 05.Swig+Bootstrap
1. 开始 准备好Express+Swig的练习代码:https://github.com/Mengkzhaoyun/nodepractise 准备好AdminLTE后台管理模版:https://ww ...
- nodejs个人配置
国内镜像,飞一般的感觉!编辑 ~/.npmrc 加入下面内容 registry = http://registry.cnpmjs.org npm config set registry http:/ ...
随机推荐
- Log4j用法
本篇仅仅是简单介绍了在写一个测试例子时,怎么使用log4j的经验,如果用于生产环境,估计还需要在深入一步去了解更多详细的配置信息. log4j.properties 配置信息: log4j.rootL ...
- C#.Net 调用方法,给参数赋值的一种技巧
C#中可以给参数赋值默认值(其实这种写法有点不太好,有时会使方法的功能太复杂了)。 但是往往有多个默认参数时,有的参数需要使用默认值,有的不使用默认值,这时正常的写法就行不通了,解决方法可参照下边的代 ...
- js 格式化数字保留2位小数
function toDecimal2(x) { var f = parseFloat(x); if (isNaN(f)) { return false; } var f = Math.round(x ...
- array_merge注意细节
array_merge:合并一个或多个数组,一个数组中的值加在前一个数组的后面,返回的新数组作为结果 如果输入的数组中有相同的字符串键名,则该键名后面的值覆盖前面的,如果数组包含相同的数字键名,后面的 ...
- python核心编程学习记录之面向对象编程
未完待续525
- ios项目总结一:开发中常用的设计模式
一.单例设计模式 1.应用场景: 程序运行期间,在内存中只有一个实例存在,主要用于资源共享,对硬件的访问等等 2.优点: 跨模块,解耦合,使用简单 3.敏捷原则: 单一职责原则 4.SDK实例: UI ...
- 常用HTML正则表达式
1.只能输入数字和英文的: <input onkeyup="value=value.replace(/[\W]/g,'') " > 2.只能输入数字的: <inp ...
- js广告弹窗
生活中我们经常遇到一些烦人的广告页面,比方说弹窗,悬浮等等各种广告.有的同事甚至都下一个屏蔽广告插件到浏览器上.这样就防止了广告的干扰. 但是我们学前端的必须是要知道广告弹窗这个做的过程,甚至是它的原 ...
- 怎样使用 GitHub?
作者:珊姗是个小太阳链接:https://www.zhihu.com/question/20070065/answer/79557687来源:知乎著作权归作者所有,转载请联系作者获得授权. 作为一个文 ...
- UVA10561 Treblecross 组合游戏/SG定理
Treblecross is a two player gamewhere the goal is to get three X in a row on a one-dimensional board ...