In cmd as follows:
Node -v
NPM -v
As some npm some reason blocked resources or foreign resources, often resulting in the installation of dependencies with npm fails, all I need npm domestic CNPM mirror ---
CNPM -v error, cnpm not an internal command. Solution is as follows:
Installation CNPM
https://jingyan.baidu.com/article/9080802239521cfd90c80f55.html
Once complete, we can use cnpm to install the dependencies instead of npm.
Installation vue-cli scaffold build tool
cnpm install -g vue-cli
安装webpack
cnpm install webpack -g
Enter someone else's (or downloaded online) vue project. Note: First, to delete others vue project inside node_modules, or will install error!
Required dependencies to install Project:
CNPM install
Well, vue needed for the project environment and dependence are fitted.
Everything is ready to start the project
cnpm run dev
Well, congratulations: incorrect report: node_env not an internal or external command .......
Baidu reason: compatibility issues with windows front-end node implementation of the project, the windows do not support NODE_ENV = set way of development, in this operation in powershell is not supported, and is not supported in cmd, it is a Mac or Linux bash shell in a unique operation.
Solution: Install the across-env solve cross-platform issues
CNPM install Cross-env --save-dev
https://www.cnblogs.com/zhishaofei/p/8441032.html
Ali modifications in the project file package.json:
1, in front of all NODE_ENV plus cross-env (note the space left between the two).
2, Ali this project up and running by default ip is 0.0.0.0, wanted to change the ip of your computer, otherwise open. (My local computer IP is 192.168.0.120)
Modify Well, then try again: Let's Go to start
D: \ ali \ cnpm run dev
In the browser input given access link address: http://192.168.0.120:3000/
ok perfect, it took nearly two hours to finally Ali upload short video demo version vue run up, and before I mainly engaged in the back-end and interfaces, it seems that I can walk around the front end. let's go. . . . . .
More will a new technology to compete one more weapon than the others, more than one way.