微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 Rails 应用程序上部署 ruby​​:SassC::SyntaxError:错误:`map-merge($map1, $map2)` 的参数 `$map2` 必须是一个地图

如何解决在 Rails 应用程序上部署 ruby​​:SassC::SyntaxError:错误:`map-merge($map1, $map2)` 的参数 `$map2` 必须是一个地图

我尝试部署我的第一个 ruby​​ on rails 应用程序,我将源代码从 github 推送到hatchBox 并在预编译资产过程中出错

yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and Failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > draft-js-custom-styles@2.1.1" has incorrect peer dependency "draft-js@0.10.x".
warning " > bootstrap@4.6.0" has unmet peer dependency "popper.js@^1.16.1".
Done in 16.15s.
I,[2021-02-16T15:21:14.603525 #206851]  INFO -- : Writing /home/deploy/xxx/releases/20210216152038/public/assets/trestle/admin-46250cedcdfe4be88c1f0ba9fb5fa2f1beee28af829290e9be2d922767bd6e2a.css
I,[2021-02-16T15:21:14.604660 #206851]  INFO -- : Writing /home/deploy/xxx/releases/20210216152038/public/assets/trestle/admin-46250cedcdfe4be88c1f0ba9fb5fa2f1beee28af829290e9be2d922767bd6e2a.css.gz
I,[2021-02-16T15:21:14.767683 #206851]  INFO -- : Writing /home/deploy/xxx/releases/20210216152038/public/assets/trestle/admin-54b0b028948f9d5a4ee565ec39f4967356d23ebc169f59023c2a3ea5c6746e1b.js
I,[2021-02-16T15:21:14.767848 #206851]  INFO -- : Writing /home/deploy/xxx/releases/20210216152038/public/assets/trestle/admin-54b0b028948f9d5a4ee565ec39f4967356d23ebc169f59023c2a3ea5c6746e1b.js.gz
rake aborted!
SassC::SyntaxError: Error: argument `$map2` of `map-merge($map1,$map2)` must be a map
        on line 152:9 of node_modules/bootstrap/scss/_variables.scss,in function `map-merge`
        from line 152:9 of node_modules/bootstrap/scss/_variables.scss
        from line 9:9 of node_modules/bootstrap/scss/bootstrap.scss
        from line 46:9 of app/assets/stylesheets/application.scss
>> $sizes: map-merge(

   --------^
/home/deploy/xxx/releases/20210216152038/node_modules/bootstrap/scss/_variables.scss:152

我曾经通过~/node_modules/bootstrap/scss/bootstrap.scss中的更新脚本来解决我的MacOS工作站中的这个问题

@import "bootstrap/functions";
$sizes: (); // <-- Fix here
@import "bootstrap/variables";
@import "bootstrap/mixins";

这是我的第一次部署,我不知道如何访问生产服务器并从 node_modules 打开 bootstrap.scss 文件以在部署我的第一个项目之前更新脚本或有没有人有解决此问题的解决方案?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。