After creating a project using Vue-CLI, NPM init often has the following problem: PhantomJS not found on PATH

This is because the file phantomjs-2.1.1-Windows.zip is too large, the network is not easy to download failed.

Method one: you can use CNPM installation, speed will be faster CNPM installation method: NPM install – g CNPM – registry=https://registry.npm.taobao.org

 

Method 2:

The URL here is wrong, so we can manually download the zip package, put it into the corresponding directory, and then re-install it after executing NPM install. Note the version here!

PhantomJS download history download address CSDN download address