运行环境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

  1. grunt-cli: The grunt command line interface. (v0.1.13)
  2. Fatal error: Unable to find local grunt.
  3. If you're seeing this message, either a Gruntfile wasn't found or grunt
  4. hasn't been installed locally to your project. For more information about
  5. installing and configuring grunt, please see the Getting Started guide:
  6. http://gruntjs.com/getting-started

看文件意思是缺少Gruntfile或者项目里没有安装grunt,结果我上网搜不到准确结果。

下载到本地

>npm install grunt

>grunt

  1. >> Local Npm module "grunt-contrib-copy" not found. Is it installed?
  2. >> Local Npm module "grunt-contrib-concat" not found. Is it installed?
  3. >> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
  4. >> Local Npm module "grunt-css" not found. Is it installed?
  5. Warning: Task "concat" not found. Use --force to continue.
  6. 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遇到的问题的更多相关文章

  1. nodeJS npm grunt grunt-cli

    1.安装好nodeJS后 ,一般都会把npm也安装好的.nodeJs集成npm的,可通过在cmd 分别运行 node -v和 npm -v来查看他们的版本,假设显示可说明可继续以下的操作 2.想安装g ...

  2. grunt让Nodejs规范起来

    Aug 17, 2013 Tags: gruntJavascriptnodejs Comments: 9 Comments grunt让Nodejs规范起来 从零开始nodejs系列文章,将介绍如何利 ...

  3. 安装完grunt和grunt-cli仍然无法识别grunt

    如题: 在安装完grunt-cli和grunt之后,仍然不识别grunt. 反复确认是-g安装... 原因: 有可能是nodejs安装出现问题,到时npm的路径没有出现在环境变量里面. 把C:\Use ...

  4. ubuntu14.04下nodejs + npm + bower的安装、调试和部署

      1. 简介 本文介绍ubuntu14.04下nodejs+npm+bower的安装.调试和部署 参考文档 https://docs.npmjs.com/getting-started https: ...

  5. Grunt-cli的执行过程以及Grunt加载原理

    通过本篇你可以了解到: 1 grunt-cli的执行原理 2 nodeJS中模块的加载过程 Grunt-cli原理 grunt-cli其实也是Node模块,它可以帮助我们在控制台中直接运行grunt命 ...

  6. AngularJS+NodeJS环境搭建

    需要安装的软件: node-v0.12.7-x64.msi python-2.7.10.amd64.msi Git-2.5.1-64-bit.exe (注意:Git安装时,需要选择的步骤)  安装位置 ...

  7. web前端开发中Nodejs、Grunt、npm等的介绍、使用

    一.Nodejs的安装: Grunt和所有grunt插件都是基于nodejs来运行的,如果你的电脑上没有nodejs,就去安装吧.去 https://nodejs.org/ 上,点击页面中那个绿色.大 ...

  8. Nodejs in Visual Studio Code 05.Swig+Bootstrap

    1. 开始 准备好Express+Swig的练习代码:https://github.com/Mengkzhaoyun/nodepractise 准备好AdminLTE后台管理模版:https://ww ...

  9. nodejs个人配置

    国内镜像,飞一般的感觉!编辑 ~/.npmrc 加入下面内容 registry = http://registry.cnpmjs.org npm config set registry  http:/ ...

随机推荐

  1. EF 之 MVC 排序,查询,分页 Sorting, Filtering, and Paging For MVC About EF

    最近悟出来一个道理,在这儿分享给大家:学历代表你的过去,能力代表你的现在,学习代表你的将来. 十年河东十年河西,莫欺少年穷 学无止境,精益求精    上篇博客我们学习了EF CodeFirst增删改查 ...

  2. RCNN--对象检测的又一伟大跨越 2(包括SPPnet、Fast RCNN)(持续更新)

    继续上次的学习笔记,在RCNN之后是Fast RCNN,但是在Fast RCNN之前,我们先来看一个叫做SPP-net的网络架构. 一,SPP(空间金字塔池化,Spatial Pyramid Pool ...

  3. Entity FrameWork对有外键关联的数据表的添加操作

    前天做了一个MVC Entity FrameWork项目,遇到有外键关联的数据编辑问题.当你编辑的时候,按照正常的逻辑,把每个字段的数据都对号入座了,然后点击保存按钮,本以为会顺理成章的编辑数据,但是 ...

  4. WDR7500 花生壳问题

    新进一WDR7500 居然不能解析花生壳. 百度一番, 发现别人有同样的问题. 找来找去从别人的只言片语中发现需要升级固件. 好不容易加入一个群, 把固件下下来. 升级固件, 重新设置, 解析成功. ...

  5. 解决ADB端口占用问题

    方式一5037为adb默认端口,若5037端口被占用,查看占用端口的进程PIDC:\Users\wwx229495>netstat -aon|findstr 5037   TCP    127. ...

  6. SQL递归查询(with cte as)

    with cte as ( select Id,Pid,DeptName,0 as lvl from Department where Id = 2 union all select d.Id,d.P ...

  7. [poj2828] Buy Tickets (线段树)

    线段树 Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must ...

  8. Java开发中经典的小实例-(比较输入数值的最大值、最小值和平均值)

    //输入数字个数来产生数字并且比较大小 import java.util.Scanner;public class Test1 {     public static void main(String ...

  9. Linux文本流

    Linux文本流   作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 文本流 文件用于数据的存储,相当于一个个存储数据的房子.我们 ...

  10. hdu 4283 You Are the One 区间dp

    You Are the One Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...