dspace-angular 7.6 won't build with Node v20 #2290
Labels
bug
code task
dependencies
Pull requests that update a dependency file
help wanted
Needs a volunteer to claim to move forward
high priority
port to dspace-7_x
This PR needs to be ported to `dspace-7_x` branch for next bug-fix release
Describe the bug
The stylesheet varies; the location is always "64:84", which likely doesn't exist in the named file. Some component of the toolchain has very poor error recovery. There's a Stack post somewhere about this, and it seems that everyone who comes there says none of the previous answers worked but he found a new one that does.
Even when I install
nvm
and set it to Node v18, I get the same error.After much trial and error and Googling all over the place: for some reason,
webpack
was evadingnvm
and using the systemnode
v20. Thecss-loader
version it wanted was unable to cope, threw up its hands, and some bletcherous piece of code with rotten error recovery somehow turned that into "unterminated string token" at a nonexistent location.To find this, I had to disable optimization (twice) in
angular.json
. I then had to raise the "initial" budgets to 13mb/15mb to get to the server build and see the real problem that should have been reported all along. After that I raised the@angular/cli
version to 16.0.4 -- the latest. That got me acss-loader
that was, not the latest, but late enough not to wig out when running on Node v20.So, it appears that the minimum we'll need to support building with Node v20 in some future release is:
yarn install
)(
ng version
says: "Node: 20.2.0 (Unsupported)" but built it anyway.)To Reproduce
Steps to reproduce the behavior:
yarn build:prod
Expected behavior
A clean build as on Node v18.
The text was updated successfully, but these errors were encountered: