ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

front-end fails to build #1232

Closed ctm closed 10 months ago

ctm commented 10 months ago

Make it so yarn dev and yarn build work again.

yarn dev and yarn build were complaining:

...
ERROR in ./mb2.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./mb2.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'indexOf')
    at /Users/ctm/poker/rust/poker/front-ends/web/node_modules/sass/sass.dart.js:116832:12
...

Turns out, I had upgraded to node 21 and the build broke.

Although it doesn't appear to be Dart's fault, per-se, this hot-fix should solve the problem once it's on stable. In the meantime, I've reverted to node 20 using:

[master]% brew unlink node
[master]% brew install node@20
[master]% brew link --overwrite --force node@20

and now everything works again.

IOW, I've created this GitHub issue after I fixed the problem. I just wanted to write down what I did, because I don't often have to revert to a previous version of something from brew.

ctm commented 10 months ago

Deploying now.

ctm commented 10 months ago

FWIW, the fix has bubbled up into the stable sass package, so I can now build with node21.

[master]% brew upgrade
[master]% brew uninstall node@20