Problem Description: when installing with yarn, node sass reports an error, as shown in the figure
Solution:
1. Uninstall node
2. Reinstall node and be sure to check the following steps
3. After node installation, the following script will pop up automatically. Click any key to continue
Note: Python, vs Build Tools and the installation tool chocolate for windows will be installed here.
4. The script here says that chocolate will be installed, and use this tool to install other tools. Click any to continue
5. Start PowerShell to install chocolate, Python and vs build tools
different versions of node have different vs and python installed. I installed Python 3 and vs2017 build tools. Due to the local environment, they have been installed, so the screenshot is as follows
6. the installation speed of vs build tools will be very slow. Do not forcibly stop powershells, otherwise the installation of vs build tools will be incomplete </ font>
7. After the installation is successful, chocolatey installs python2 choco install python2
8. Delete node_ Modules folder, yarn cache clean
clear cache, reinstall, successful!
common problem
The installed node version is node-v14.0 18.2, so Python 3 and vs2017 build tools are installed
error msb4132: unrecognized tool version "2.0". The available tool versions are "14.0", "4.0"
Reason: a higher version of vsbuildtools is installed
Solution: use chocolate to install vs2017buildtools, and enter it on the command line
choco install visualstudio2017-workload-vctools --version 1.3.3
Chocolatey is slow to install python2. You can uninstall chocolatey and reinstall
it is useless to uninstall node, because chocoloatey will not be uninstalled automatically when node is uninstalled. Find the specific method by yourself.
View all installed software in the current system, and enter choco list - Li
in the command line