Recently ready to initialize a project with VUE-CLI, need to sass-loader compile;
found that the NPM install Node-sass and Sass-loader have been error-
The window command line prompts me to install Node-gyp globally, with some hints that Python cannot be found locally,
So I follow the prompts to install Node-gyp
node-gyp
is a cross-platform command-line tool written in node. js to compile the local plug-in module for node. js.
Node-gyp
NODE-GYP official website Https://www.npmjs.com/package/node-gyp
Command line Code
NPM install-g Node-gyp
After installation, I found an error, and finally found the Official document window environment to install window's own build tool
So we're going to write a single line of commands
Install--global--production windows-build-tools
It is important to note that the command must be in the CMD command window run by the administrator because of the permissions
After the installation is successful, we can install the Node-sass, hoping to help everyone
NPM Install node-sass Error in window environment