Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dummy app's npm install failing on M1 Macs #26

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

aaron-contreras
Copy link
Member

@aaron-contreras aaron-contreras commented Apr 10, 2023

Issue 25: Running npm install on dummy app fails to build

Changes

  • Bumped @rails/xxx JS packages in dummy app to match their Rails gem counterparts.
  • Added gcompat for nokogiri capabilities on M1 Macs.

Notes

@rails/webpacker@5.2.1 was the presumed culprit of this as per inspection of the package-lock.
Also noticed that the JS packages for the Rails gem counterparts were out-of-sync (Rails 7.x gems with rails@6.x JS package versions).

When running ./bin/webpack now, I noticed there's an issue that pops up listing:

DEPRECATION WARNING: $weight: Passing a number without unit % (100) is deprecated.
To preserve current behavior: $weight * 1%
More info: https://sass-lang.com/d/function-units

> @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);

Upon a bit of research, it seems it's an actual Sass/Bootstrap problem and should be addressed in Bootstrap v5.2.3, as mentioned here . Perhaps this should be an update taken care of an a separate issue (bumping the Bootstrap version. I don't know what the compatibility rules are when it regards to this and an open source project.). Have you seen this in any of your branches/projects? @jonasjabari I haven't seen it in any client projects come up using matestack-ui-bootstrap with webpacker or with importmap.

In order to solve the nodegyp situation, just bumped up the
NPM package versions to match the gem versions and that got rid
of the node-sass dependency and started picking up on using sass
instead.
In order to use nokogiri on ARM architecture with an alpine
image, we need gcompat as per this thread: https://stackoverflow.com/a/71014474
@aaron-contreras aaron-contreras merged commit 6e3e306 into develop Apr 19, 2023
@aaron-contreras aaron-contreras deleted the issue-25/npm-install-failing-on-m1-mac branch April 19, 2023 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants