NPM I recently received a new project and found some problems when running the project after pulling down the code:

Problem 1: Node-sass and Python cannot be found

Solution: 1. Run the NPM i-save node-sass command to install node-sass

2. Download and install Python from www.python.org/

Error 2: The node.js and Node-sass versions are incompatible after the preceding two versions are installed

Solution: Download node-sass corresponding to Node version

Since I installed Node.js as the latest version 16.13.1 and Node-sass is currently 4.14.1, there are two solutions: 1. Upgrade the Node-sass version; 2. 2. The Node. js version is degraded

The latest version of Node.js16.13.1 does not have the corresponding node-sass, so I take option 2 and downgrade the node.js version to Node14 corresponding to Node-sass4.14.1.

Steps:

1: Uninstall node.js and go to nodejs.org/zh-cn/downl… Download the corresponding Node.js, which I chose as v14.18.1 64-bit.

2: the configuration of the corresponding variable environment, with reference to the document: www.cnblogs.com/vfuy/p/1400…