Error: Missing binding D:\Java_Tools\Java_Project\JAVA_PROJECT\xueden-boot-v

施洛城
2023-12-01

在执行npm run dev 运行vue项目的时候出现的错误提示如下



Module build failed: Error: Missing binding D:\Java_Tools\Java_Project\JAVA_PROJECT\xueden-boot-vue9\xueden-boot-vue\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

Found bindings for the following environments:
-Windows 64-bit with Node.js 8.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.



从中间error部分往下看,给出了错误的提示信息
This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.

这个提示要我们重新安装node-sass
使用cnpm命令安装即可:cnpm rebuild node-sass --force,使用cnpm安装的前提是配置了国内镜像,配置国内镜像的方法参考:https://blog.csdn.net/weixin_44874132/article/details/109382107。

在执行cnpm rebuild node-sass --force后如果一路顺风就大吉大利了,啥事都不用操心就可以启动项目了,但是如果在安装node-sass过程中报错了也不用紧张,因为笔者我就遇到了,刚好可以给你们提供解决方案,报错信息如下:
Error:Can’t find Python executable “python”, you can set the PYTHON env variable.
解决方案参考:https://blog.csdn.net/weixin_44874132/article/details/109474707

 类似资料: