运行环境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. adop - ERRORMSG: Since earlier patching session failed and you are invoking apply again

    $ adop phase=apply patches= hotpatch=yes *******FATAL ERROR******* PROGRAM : (/app/oracle/apps/VIS/f ...

  2. hadoop datanode启动失败

    问题导读: 1.Hadoop出现问题时,该如何入手查看问题?2.datanode无法启动,我们该怎么解决?3.如何动态加入DataNode或TaskTracker? 一.问题描述当我多次格式化文件系统 ...

  3. cocos2d-x使用AssetsManager类实现资源的在线更新

    从2.1.2版本开始,2dx在libExtensions下添加了一个AssetsManager类用于资源的在线更新和简单的版本管理,同时添加了AssetsManagerTest项目示范了AssetsM ...

  4. C# 获取sql数据库表列名,及列名说明备注信息

    获取指定表列名及备注: select * from syscolumns where id=object_id(N'表名') SELECT a.name [column], b.name type, ...

  5. Sie sind das Essen und wir sind die Jaeger!

    WCF  http://www.cnblogs.com/iamlilinfeng/archive/2012/09/25/2700049.html HTTP 数据库分库分表 读写分离 负载均衡 wind ...

  6. Cutterman 切图神器,虽然还没用过,先 mark 一下好了

    在官网上找了半天也没发现下载链接,注册账号用无法激活,还是等等再试吧.

  7. apache+php+mysql的配置(转载)

    windows: 按http://jingyan.baidu.com/article/fcb5aff797ec41edaa4a71c4.html的安装 按http://www.jb51.net/art ...

  8. mysql常用命令(3)

    一.启动与关闭 1.1 Linux下启动mysql 的命令: a. rpm包安装:service mysqld start b. 源码包安装:/usr/local/mysql/bin/mysqld_s ...

  9. cf 700 B Connecting Universities

    题意:现在给以一棵$n$个结点的树,并给你$2k$个结点,现在要求你把这些节点互相配对,使得互相配对的节点之间的距离(路径上经过边的数目)之和最大.数据范围$1 \leq n \leq 200000, ...

  10. Android ToolBar

    众所周知,在使用ActionBar的时候,一堆的问题:这个文字能不能定制,位置能不能改变,图标的间距怎么控制神马的,由此暴露出了ActionBar设计的不灵活.为此官方提供了ToolBar,并且提供了 ...