运行环境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. Hosts简单说明

    Hosts是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联"数据库",当用户在浏览器中输入一个需要登录的网址时,系统 ...

  2. Visual Studio C#的winform/webform/asp.net控件命名规范

    控件命名规范 类型 前缀 示例 AdRotator adrt adrtTopAd Button btn btnSubmit Calendar cal calMettingDates CheckBox ...

  3. 如何拥有一个自己的Vagrant box

    这是一个关于Vagrant的学习系列,包含如下文章: Vagrant入门 创建自己的Vagrant box 用Vagrant搭建Jenkins构建环境 用Vagrant和Ansible搭建持续交付平台 ...

  4. Bash:-变量替换后利用大括号获取数字存在的间隔

    比如脚本输入位置变量:1_5 输出效果为: 1 2 3 4 5 脚本代码如下: #!/bin/bash i=1_5 for j in $(eval echo {${i/_/\..}});do echo ...

  5. linux查看修改线程默认栈空间大小(ulimit -s)

    linux查看修改线程默认栈空间大小 ulimit -s 1.通过命令 ulimit -s 查看linux的默认栈空间大小,默认情况下 为10240 即10M 2.通过命令 ulimit -s 设置大 ...

  6. LR HTML与URL录制方式区别

    Recording录制选项 这里提供了两个大类的录制方式: 1. HTML-based script基于HTML的脚本 这种方式录制出来的脚本是基于HTML基础的,为每个用户操作生成单独的步骤,这种脚 ...

  7. Android 网络框架 volley源码剖析

    转载请注明出处:  http://blog.csdn.net/guolin_blog/article/details/17656437 经过前三篇文章的学习,Volley的用法我们已经掌握的差不多了, ...

  8. [ASM C/C++] C makefile:2: *** missing separator. Stop. 问题

    在利用make编译代码时,makefile文件的目标代码前面要用tab而不能用空格来代替. 要不然就会提示: makefile:2: *** missing separator.  Stop. 要注意 ...

  9. Auty自动化测试框架第二篇——读取与执行脚本列表

    [本文出自天外归云的博客园] 在Auty中的文件结构,lib目录下的read_selection.py和execute_selection.py文件:

  10. 改变Web Browser控件IE版本

    默认的webbrowser控件使用的渲染模式版本似乎是IE7,想要更改更高版本,如下: 在注册表位置 HKEY_CURRENT_USER\Software\Microsoft\Internet Exp ...