使用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:/ ...
随机推荐
- 文件上传(java web)
文件上传: 对表单的要求: * method="post" * enctype="multipart/form-data" * 表单中需要添加文件表单项:< ...
- C语言通用双向循环链表操作函数集
说明 相比Linux内核链表宿主结构可有多个链表结构的优点,本函数集侧重封装性和易用性,而灵活性和效率有所降低. 可基于该函数集方便地构造栈或队列集. 本函数集暂未考虑并发保护. 一 ...
- WPF:基础知识
WPF:1.数据驱动 2.UI定义与运行逻辑分离 一. 1.编译 /t:exe 命令行程序:/t:winexe 图形用户界面程序:/t:library 动态链接库 2.启动 1)编译后生成的App.g ...
- html里面的相对路径和绝对路径
HTML有两种路径的写法:相对路径和绝对路径. 相对路径是在同一个目录的文件引用,如果源文件和引用文件在同一个目录里,直接写引用文件名即可. 如: a.html: c:\test\menu\a ...
- 【转】Struts1.x系列教程(2):简单的数据验证
转载地址:http://www.blogjava.net/nokiaguy/archive/2009/01/archive/2009/01/13/251197.html 简单验证从本质上说就是在服务端 ...
- oracle表分区详解
原文来自:http://www.cnblogs.com/leiOOlei/archive/2012/06/08/2541306.html oracle表分区详解 从以下几个方面来整理关于分区表的概念及 ...
- WEB前端的原理及组成
1:认识WEB前端的组成部分和相关专业术语!具体的总结如下:
- HTML 事件属性(下)
HTML 事件属性(下) 一:键盘事件 (Keyboard Events)二:鼠标事件 (Mouse Events) 一:键盘事件 (Keyboard Events)在下列元素中无效:base.bdo ...
- 仿souhu页面设计
仿搜狐页面设计 Html页面设计代码: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ...
- Hadoop笔记HDFS(2)
高级Hadoop MapReduce管理 1 调试部署好的Hadoop的配置 2 运行基准测试检验Hadoop的安装 3 重新利用JVM提升性能 4 容错性 5 调试脚本-分析失败任务原因 6 设置失 ...