使用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:/ ...
随机推荐
- on-my-zsh agnoster 主题设置问题
安装Menlo-Powerline字体补丁 https://gist.github.com/qrush/1595572/raw/417a3fa36e35ca91d6d23ac96107... 然后 c ...
- pepperflash
sudo apt-get install pepperflashplugin-nonfree sudo update-pepperflashplugin-nonfree --install
- Thinkphp---------Call to a member function free_result() on a non-object
1.平时用框架用久了,直接执行原生的sql反而做起来反应迟钝了.今天遇到一个问题,就是直接执行一个添加的sql语句,然后我用了TP框架的M()->query();方法.运行以后,会报Call t ...
- CSS3 中border-image详解
CSS3 border-image详解.应用及jQuery插件 一.border-image的兼容性 border-image可以说是CSS3中的一员大将,将来一定会大放光彩,其应用潜力真的是非常的惊 ...
- HttpClient_001_初步实现项目01的servlet,与项目02的servlet,之间数据访问
HttpClient_001_初步实现项目01的servlet,与项目02的servlet,之间数据访问 代码下载地址: http://download.csdn.net/detail/poiuy19 ...
- 关于silverlight打印模糊的问题
今天做silverlight打印实现时,发现一个问题,就是sl打印处理的文字很模糊 这样肯定不行撒,于是开始找解决办法,首先想到的是silverlight中文显示的问题,好 ...
- python :页面布局 ,后台管理页面之左侧菜单跟着滚动条动
左侧菜单跟着滚动条动 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// ...
- Going from u to v or from v to u?_POJ2762强连通+并查集缩点+拓扑排序
Going from u to v or from v to u? Time Limit: 2000MS Memory Limit: 65536K Description I ...
- php入门
最近公司招了几个应届毕业生,他们对前端的了解还挺多,但是对后端的技术一无所知,我觉得,作为一个前端攻城狮,如果你有远大的抱负,就应该雨露均沾... 今天我就跟大家讲一讲PHP最基本的入门,至少别人问起 ...
- js瀑布流
<!doctype html><html><head><meta charset="utf-8"><title>无标题文 ...