likes
comments
collection
share

记录一次M1 芯片 运行Node-Sass的踩坑过程(已解决)

作者站长头像
站长
· 阅读数 37

在使用M1芯片的Mbp试图运行 ren-ren-fase-vue 项目时 node-sass 出现了如下报错 Node Sass does not yet support your current environment

最终的解决方案是:

-- 删除之前的依赖rm -rf node_modules/-- 安装saas 代替 node-sass 后面的 ignore scripts是为了避免 安装chromedriver等依赖时出现 不能在mac os 运维 sh 命令的问题

npm install node-sass@npm:sass --ignore-scripts
npm run dev

此方法的优点是无需使用 rosetta 打开控制台但是需要 npm的版本号大于 6.9

解决方案最后是在 stackoverflow中找到的。记录一次M1 芯片 运行Node-Sass的踩坑过程(已解决)

原文链接:https://stackoverflow.com/que...

转载自:https://segmentfault.com/a/1190000041512957
评论
请登录