Smithsonian / dpo-voyager

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

update sass-loader: incompatible peerDep over the installed node-sass #243

Closed sdumetz closed 5 months ago

sdumetz commented 9 months ago

Peer dependency that caused an error under the newer npm versions:

-sass-loader@12.3.0 peer dependency over node-sass@"^4.0.0 || ^5.0.0 || ^6.0.0" while node-sass@^7.0.3 is installed:

The peer dependency warning on schema-utils@3.1.1 (peer dependency over ajv@^6.9.1) couldn't be solved because it doesn't look like a good idea to downgrade ajv and it's not possible to upgrade all packages requiring it as raw-loader has not been updated with a newer version.

The preferred solution here might be to drop raw-loader and use the asset-modules provided by webpack 5 but that's another subject better left for some future PR.

Added an "engine" requirement to enforce the new min nodejs version of >=14.15.0, which is still generous given the official maintenance timeline. It is also in line with the requirement of #242. Still too recent for Ubuntu 18 though.

I checked the old/new dist/ folders and it reported no change after the update.

gjcope commented 8 months ago

Looks good to me, thanks! Similar to #242 just looking to make sure it's not disruptive to non-developer users. I should be able to bundle these together when we are ready to move.

gjcope commented 6 months ago

@sdumetz Would really like to make this jump but need the package to build with the included docker profile as well. I tried bumping to Ubuntu 20 and Node 16 but it freezes for me on build. I know you are not using it, but if you have a chance could you just see if https://github.com/Smithsonian/dpo-voyager/commits/dev-upgrade/ will build for you? It would be great to get somewhat back on track with Node version.

sdumetz commented 6 months ago

Hi,

I checked-out the branch and the docker image builds fine (both development and production). If I delete dist/ and services/server/bin/, it builds the client and server before starting the server

npm install --dev is redundant as it is the default behavior, but I didn't see it causing any problem otherwise.

Didn't test if the server was working properly, I stopped at Server ready and listening on port 8000.

I'm not familiar with those scripts though so I'm not even sure I ran them properly?

gjcope commented 6 months ago

@sdumetz Thanks for taking a look. Good to know it is at least building for you. It must be something specific about my configuration. I added in the install --dev because after bumping the Node version it was only installing production dependencies when node_env == production. But maybe that's a symptom of whatever else is going on. Thanks again for taking a look.

gjcope commented 6 months ago

Merged here: https://github.com/Smithsonian/dpo-voyager/tree/dev-upgrade - finally got a solid build. Thanks for the PR and sorry for the delay!