Solve the front-end project Cannot read properties of null (reading 'pickAlgorithm'), an error occurred when pulling project installation dependencies

When first pulling a project npm i

But the following problem occurs

Solution 1 (the author of this solution failed to use it, and then gave up using npm)

Solution steps:

①Input command: npm cache clear --force

② Then reinstall the dependencies: npm i

③Finally run the project: npm run serve

Solution 2 (it may be that the node version is too high and does not match the project, and then use cnpm, Taobao mirror source)

Solution steps:

① Uninstall your own node first, and reinstall the lower version

Find the control panel, uninstall it very cleanly in the control panel

② Go to the official website of node to find the old version, the previous version | Node.js

 

 Click to download and install by default. Detailed installation steps (default is fine): Node.js installation configuration | Cainiao Tutorial

 ③Enter the global cmd and configure cnpm

Installation: command prompt execution

  1. npm install cnpm -g --registry=https://registry.npm.taobao.org

Test for successful installation

  1. cnpm -v

npm set domestic mirror

  1. npm config set registry https://registry.npm.taobao.org

④ Finally, use cnpm i to install dependencies

⑤ Run the project with cnpm run serve

 

 success!

Guess you like

Origin blog.csdn.net/weixin_43928112/article/details/125074534