Today, I fork a small demo (https://github.com/cowboy/jquery-tiny-pubsub) of a grunt project written by someone on GitHub, mainly to learn about the use of grunt, According to the official document (http://www.gruntjs.org/docs/getting-started.html), step by step to execute, first of all, the project needs to use a few grunt plug-ins, the other installation is not a problem, However, when installing to grunt-contrib-qunit this plugin, the following error occurred,
This means that the request Phantomjs-1.7.0-windows.zip timeout, in short, is not down, the main reason is that the site is a wall, through node NPM can not directly download,
The solution can be manually downloaded (Http://pan.baidu.com/s/1hqwZmTI) version of Windows, and then follow the given error address to put it in the appropriate directory, generally into the main directory of this project, such as my C:\Users\ After Thinkpad\desktop\grunttest\jquery-tiny-pubsub\node_modules, because the installation fails there is no grunt-contrib-qunit this directory, But when you run NPM install in the Project Master directory, It will follow your Package.json to install the plugin inside, so a grunt-contrib-qunit directory will be generated, but when your installation fails, the directory is deleted, so you need to run NPM for the first time Copy this automatically generated directory when you install it, place it somewhere, and then add the ZIP package you downloaded manually by following the path below.
, then run NPM install again to succeed, and run grunt to perform the tasks you set
In fact, it is best to use Linux or Mac down the grunt,windows under this set of environment to build more problems. The above is configured in the Win7 environment
Grunt-contrib-qunit installation process PHANTOMJS installation error problem solving