playcanvas / pcui

UI component library for web-based tools
http://playcanvas.github.io/pcui
MIT License
670 stars 65 forks source link

Build fails on Node v15+ #74

Closed LeXXik closed 3 years ago

LeXXik commented 3 years ago

A clean build fails on Node v15+, because node-sass package is not supported on it: https://github.com/sass/node-sass/releases/tag/v4.14.1

willeastcott commented 3 years ago

I'm not sure this is a bug, per se. The Node.js site recommends most people stick to 14.x for now. Do you have any suggestions about how you would like this to be addressed?

LeXXik commented 3 years ago

Right, this is not a bug, but a compatability issue. One option is to add a description that the build is limited to Node v14. Another option could be to up the dependencies. For example, the problematic node-sass supports Node v15 in its latest v5.0.0 release: https://github.com/sass/node-sass/releases/tag/v5.0.0 But that means there are some breaking changes, and might have some impact on other modules, which would also need to be updated. I will test it later.

kungfooman commented 3 years ago

node-sass is installed because sass-loader depends on it, yet it does not need to and the sass-loader people suggest sass:

https://www.npmjs.com/package/sass-loader

image

Therefore I would just uninstall node-sass, especially because it's a C/C++ monster using up like 260MB (Visual Studio Build, Python installation and only god knows what else), while sass package is exactly 5 files:

image

npm uninstall node-sass
npm install sass

But I just tested that and webpack seems unable to deal with that:

image

While rollup has no problems with it:

image

LeXXik commented 3 years ago

Speaking of which, building PCUI feels like installing an operating system :) 70k files and 200+ Mb takes forever. I didn't want to open a new issue on this, but at some point the dependencies requirements should be reviewed.

willeastcott commented 3 years ago

I had a go at upgrading all the NPM dependencies and I get:

image

kungfooman commented 3 years ago

Did you do npm update --force? A normal npm update failed for me:

image

Did you switch node-sass with sass? I did npm update --force (had sass replaced yesterday already) and everything works with node v15 here.