运行环境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. URL后面带\斜杠对SEO的影响

    例如以下的两种URL书写方式: 1.www.baidu.com 2.www.baidu.com\ 这两种书写方式的区别到底在哪里呢?哪一个的速度更快呢?可能对于我们大多数人来说会觉得两个速度一样,因为 ...

  2. 注解的基本盘点 -- 《Java编程思想》

    注解(元数据)为我们在代码中添加信息提供了一种形式化的方法,使我们可以在之后的某一个时刻非常方便地使用这些数据. ---<Java编程思想> 其实注解可以理解为一个工具类,只要使用了这个工 ...

  3. PSVR开发者需要了解的9件事

    1 首先需要了解下PSVR的具体硬件参数:整个产品都包括哪些: 2 如何创造更好的 VR 内容 三种准备:设计.内容.技术 针对PSVR设计:体验范围.跟踪限制.社交屏幕 VR应用和内容:模拟.沟通. ...

  4. ECMAScript数据类型

    [ 基本数据类型 ]-->5种 Undefined Null Boolean Number String [ 复杂数据类型 ]-->1种 Object [ typeof 返回值] --&g ...

  5. Java语言的特点

    一. 面向对象:其实是现实世界模型的自然延伸.现实世界中任何实体都可以看作是对象.对象之间通过消息相互作用.另外,现实世界中任何实体都可归属于某类事物,任何对象都是某一类事物的实例.如果说传统的过程式 ...

  6. Java Spring DI之旅

    做过.NET的人很多都用过Microsoft Enterprise Library,里面有一个Dependency injection工具Unity,我们可以使用它来实现依赖注入:什么是依赖注入呢?我 ...

  7. 利用BMFont和NGUI制作字体集

    Unity中常常需要制作字体,也算是Unity的基本优势吧!其实质就是BMFont和NGUI制作字体.这里把步骤介绍一下: 1.先下载BMFont这个工具 2.Font Settings  设置:(1 ...

  8. ubuntu 在mac 的 Parallels 的分辨率问题

    安装 ubuntu系统,刚开始安装成功的时候分辨率只有800*600. 设置里面只有800*600一个选项. http://linuxbsdos.com/2014/10/31/solutions-fo ...

  9. 芯航线FPGA学习套件之4*4矩阵键盘模块测试手册

    芯航线FPGA学习套件之4*4矩阵键盘模块测试手册   本手册以简明扼要的方式介绍芯航线FPGA学习套件提供的矩阵键盘模块的测试方法:   连接开发板,如下所示: 2.将矩阵键盘模块与开发板按如下图所 ...

  10. mac攻略(三) -- apache站点配置

    Mac OS X 中默认有两个目录可以直接运行你的 Web 程序, 一个是系统级的 Web 根目录:/Library/WebServer/Documents/ 此根目录我们平常使用地址http://l ...