node-sass failed to install the npm ERR! Failed at the [email protected] postinstall script.

FIG given above:

Problem: Can not find python2, node-sass installation fails, node-sass installation environment requires python, but must not be 2 version 3 of 3 If you have installed a need to uninstall reinstall, but also to change the environment variables configured address 2, after installation python -v version look and did not installed successfully.

If you install a node-sass but failed, first execution

npm uninstall node-sass best use cnpm Taobao mirror,

Then node_modules dependencies deleted, re-cnpm install, and then reported

He said node-sass did not succeed, then cnpm install node-sass it, will not run again npm run serve error, the solution

Guess you like

Origin www.cnblogs.com/qianyy/p/11202570.html