New company, new computer. I cut all the wires myself.

Pulled a project from Git (17 years old, relatively old) and then NPM install. Oh, wrong

Error: No Python environment variable found

I checked the latest version of Node-V and the team leader asked me to change it to a lower version 7.0.

The window environment cannot change the node version. Unmount the node

Install 7.0 NPM install. Error again, version 7.0 is not supported

wnm

Install NPM 12.0

Pa good

So far, feel oneself cow force bad

One day, I picked a new project (2020/8), which is relatively new.

NPM install. WNM

Unfortunately, after the last lesson I think is not the Node version of the problem. NPM install 12.0 install 13.0

Oh, still no. And I found that the previous project was also wrong

Change back to 12.0

So it’s not the Node version

Python I remember this error on laptops before

Oh, oh, I searched the next way:

Install Python and environment variable configuration must install python2.7 environment variable installation can refer to [: ] (http://blog.csdn.net/lyj_viviani/article/details/51763101) if the first way doesn't work, can have a try The second way: run the following code:  npm install --global --production windows-build-toolsCopy the code

But it still didn’t work and found another way

  1. Analysis of the problem: This is becausenode-sassIt was dropped by the wall, so it couldn’t be downloaded
  2. Problem solving: There are two ways to solve the problem, as follows:npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/Second way: set system variables according to their ownnodeInstallation path to set, as shown below:

System variable name: SASS_BINARY_PATH

  • System variable value:C: \ Users \ \ AppData \ Roaming \ NPM - 15279 cache \ node - sass \ 4.14.1 \ win32 - x64-72 _binding node

And we’re done