In the project directory, shift + right mouse button, open PowerShell, enter npm i threejs-miniprogram, and execute the installation;
After the installation is complete, the directory will appear node_modules, check whether the file already exists threejs-miniprogram, the content is as follows:
Build npm in WeChat applet developer tools
On the applet toolbar, [Tools] → "Build npm", you can complete the npm build, as shown in the figure below:
Import the adapted version of Three.js for the mini program