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

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

 

前端项目运行时,报错如下

node Sass could not find a binding for your current environment: Windows 64-bit with node.js 12.x
Found bindings for the following environments:
– Windows 64-bit with node.js 12.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

 

提示需要重新编译下载node-sass,按照提示执行命令如下

 

 按照提示重新编译安装后依旧还是报错,然后试着尝试这句提示 " Found bindings for the following environments:  – Windows 64-bit with node.js 12.x "  ,意思是说nodejs 12.x版本及以上的可以找到依赖,那我干脆切换node版本看看,

 

从上面,可以看到,我将node版本从 11.13.0 切换到了 12.18.0 ,切换版本后,重新运行项目,哈哈哈,完美解决问题

注意,有时候切换node版本后,可能任然需要执行 npm rebuild 重新编译 node-sass 二进制包

 

若任然未解决,可尝试安装mirror-config-china后重试。

 

 

 

@萍2樱释ღ( ´・ᴗ・` )

posted @ 2020-09-09 10:22  不忘初心dbsdxq  阅读(6533)  评论(0编辑  收藏  举报
TOP 文章底部