Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support...

1、错误详情

一个vue项目,我在执行打包命令npm run build时出现该错误信息。具体信息如下所示:
Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (72)

在这里插入图片描述

2、错误原因

系统安装的nodejs的版本和项目中的node-sass版本不匹配。

3、解决方法

在这里插入图片描述

  • 最后需要重新编译下 node-sass
npm rebuild node-sass

4、重新打包执行成功

# install dependencies
# npm install
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm rebuild node-sass

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

猜你喜欢

转载自blog.csdn.net/qq_42761569/article/details/128803421