Skip to content

fix(build): replace node-sass with Dart Sass for Node 22 + Apple Silicon#1462

Open
rsarika wants to merge 3 commits intomasterfrom
fix/node22-dart-sass-migration
Open

fix(build): replace node-sass with Dart Sass for Node 22 + Apple Silicon#1462
rsarika wants to merge 3 commits intomasterfrom
fix/node22-dart-sass-migration

Conversation

@rsarika
Copy link
Copy Markdown
Contributor

@rsarika rsarika commented Apr 15, 2026

Summary

  • Replace node-sass (LibSass) with sass (Dart Sass) to support Node 22 and Apple Silicon (arm64)
  • Fix compound @extend .md-button:active selectors in adaptiveCard.scss that Dart Sass doesn't support — changed to @extend .md-button (the :active pseudo-state styles are already applied inline)
  • Update .nvmrc from lts/fermium (Node 14) to Node 22

Why

node-sass@4.x/7.x ships native binaries compiled with LibSass, which has no prebuilt binaries for arm64 + Node 20/22. The LibSass project is deprecated. Dart Sass (sass npm package) is the canonical maintained implementation and runs as pure JS — no native compilation needed.

Details

File Change
package.json node-sasssass ^1.32.0; sass-loader already at ^10.5.2 (auto-detects Dart Sass, webpack 4 compatible)
.nvmrc lts/fermium22
adaptiveCard.scss (src) @extend .md-button:active@extend .md-button (3 occurrences)

Test plan

  • npm install --legacy-peer-deps succeeds
  • npm start compiles and serves at http://localhost:8000/
  • Webpack outputs Compiled with warnings (pre-existing font conflicts only, no errors)
  • Jest test suite: 487+ tests pass (6 pre-existing flaky failures in unrelated modules due to Jest worker crashes on Node 22)

🤖 Generated with Claude Code

rsarika and others added 3 commits April 15, 2026 13:59
…con support

node-sass (LibSass) doesn't support arm64 + Node 20/22. Migrates to
Dart Sass (`sass` package) and fixes compound `@extend .md-button:active`
selectors that aren't supported by Dart Sass. Updates .nvmrc to Node 22.

- Replace `node-sass` with `sass` in devDependencies
- sass-loader ^10.5.2 auto-detects Dart Sass (webpack 4 compatible)
- Fix `@extend .md-button:active` → `@extend .md-button` in adaptiveCard.scss
- Update .nvmrc from lts/fermium to 22

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Switch Docker image from circleci/node:fermium (Node 14) to cimg/node:22.22
- Add --legacy-peer-deps to npm ci (project has peer dep conflicts)
- Update cache keys from fermium/npm-6 to node-22/npm-10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The fibers native module (dep of @wdio/sync) is abandoned and cannot
compile on Node 20+. Add an npm override to replace it with an empty
stub package, allowing both npm install and npm ci to succeed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant