一个命令解决Mac下运行node运行环境问题

把之前windows上的一个vue代码转到mac上跑,报错!

报错如下:

Module build failed: Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Unsupported runtime (93)
在这里插入图片描述

搜索各种博客,没有一个是能用的,换node版本也根本不适用!!!真的是各有各的解决方案,但没有一个能解决我的问题的。

解决方案:

直接google大法,搜到解决方案,一行命令即解决问题,感谢外网各种大神。

For npm > 6.9 you can switch your dependency to dart-sass/sass with just one line and from there just use sass as you would before.

npm install node-sass@npm:sass

在这里插入图片描述

问题解决:

家人们,死灰这不就活过来了么!!!
在这里插入图片描述

Logo

一起探索未来云端世界的核心,云原生技术专区带您领略创新、高效和可扩展的云计算解决方案,引领您在数字化时代的成功之路。

更多推荐