Windows 环境下 NodeJs 开发 Log
安装 NodeJs, npm.
环境变量配置.
1, Grunt
安装 :
npm install -g grunt-cli
npm install -g grunt
package.json
{ "name": "my-project-name", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.5", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-uglify": "~0.5.0" } }
使用Grunt 进行 Karma 测试任务是出现
Please set env variable CHROME_BIN 错误时
在命令行输入
SET CHROME_BIN=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
设置临时环境变量或添加 CHROME_BIN 到 系统环境变量中去即可解决.(有一些情况下, 添加系统环境变量后没有立即生效, 重新打开命令行/注销系统重启可以解决.)
引用: http://stackoverflow.com/questions/16017896/setting-environment-variable-for-chrome-bin-does-not-work
http://stackoverflow.com/questions/18924263/how-to-fix-error-please-set-env-variable-chrome-bin-when-running-angular-js-wi
https://github.com/karma-runner/karma/blob/master/docs/config/03-browsers.md#correct-path-to-browser-binary
http://gruntjs.com/
2, Karma
To be a better man.