Smithsonian / dpo-voyager

DPO Voyager - 3D Explorer and Tool Suite
Apache License 2.0
164 stars 28 forks source link

replace node-sass with sass to support build over node22 #281

Open sdumetz opened 1 month ago

sdumetz commented 1 month ago

node-sass (or rather its underlying library, libsass) has been deprecated in favor of dart-sass (the sass package.

Consequently, node-sass no longer provides new versions with prebuilt binaries for newer nodejs versions, causing the install to be super-long on node-v18.x (only supported by node-sass>=8.0). I couldn't get it to build for node-v22.x (current stable release).

With the dependency swap, voyager builds perfectly on every node version from 16.x to 22.x (didn't test anything earlier)

Using a clean install before/after this patch with node-v14.x I compared those files:

sdumetz commented 1 month ago

Force-pushed de80df3 over 1234831 to check-in a package-lock.json without the optional dependencies.

In 853abf3 I updated the CSS to address a deprecation warning from Dart-SASS.

The change is quite trivial and backward compatible.

gjcope commented 1 month ago

Thanks for the PR! Should be good as we have pushed our build image to 16.x but I will give it a test.