node-sass failed to install a variety of pit
Jane various pit book link node-sass failed to install: https://www.jianshu.com/p/92afe92db99f.
The first night saw a variety of documents failed to successfully install node-scss package, basically gave up. But the next day had an idea it solved the problem.
I am here to talk about the course of my ultimate solution, I hope all of you help.
Because using npm package management tools, on the official website of search-related npm package, view the documentation, in accordance with the documentation installation commands to install, the result was successful. O (∩_∩) O ~ ha ha, to be happy about! ! ! !
The problem is that most node-scss package, but using node in Vue project also need to install a package sass-loader, so first read the next node-scss installation package.
This is part of the installation instructions given by the official website, the first step not read, as it has been installed countless times are given.
I run directly are the following two commands, with emphasis on the first command, the second command is installed. When the first command run to completion, but still magical installed when you install.
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install node-sass
Then it is to install scss-loader package.
The following is a description of the official website npm sass-loader mounting portion of the package
npm install sass-loader node-sass webpack --save-dev
Because the official website of the installation command is given by the three-time package is installed, in fact, after the above steps now we just need a sass-loader package, in fact, node-sass package and then install it again all right, but must take webpack to delete . Then run the command.