1
首先清除根目录下的.node-gyp
卸载node-gyp模块
npm uninstall node-gyp -g
2
安装环境
npm i -g windows-build-tools
重新安装node-gyp
npm install -g node-gyp
3
设置python版本
npm iconfig set python python
4
安装.net 2.0
5
安装vs 201* c++ 环境
6安装microtime运行时
npm i microtime --save-dev
---------------------
作者:千年奇葩
来源:优快云
原文:https://blog.youkuaiyun.com/lengyoumo/article/details/72235131
版权声明:本文为博主原创文章,转载请附上博文链接!
本文提供了一套详细的步骤来解决在Node.js环境下编译模块时遇到的问题,包括清除旧的编译文件、安装必要的构建工具、设置Python版本、安装.NET框架及VS C++环境,确保开发环境的稳定性和兼容性。
1万+

被折叠的 条评论
为什么被折叠?



