After pulling the code from the warehouse, npm i starts the project and an error occurs, as shown in the figure:
Solution:
First npm i downloads the project dependencies. After the download is complete, go to the upper left cornerTools--Build npm to generate miniprogram_npm package
After seeing the generated miniprogram_npm package, directly delete the node_modules folder and recompile the project~
Note: If miniprogram_npm and node_modules are accidentally deleted later, or another plug-in is installed by executing npm install "插件"
, as long as there is a corresponding plug-in package under dependencies in the package.json file, You can delete both miniprogram_npm and node_modules, then execute npm i
, and finally build npm as above.