node v16+ causes errors when building and installing packages
Petrit-Halabaku opened this issue ยท 4 comments
Package errors on higher versions of node
whenever I try using the latest version of node and even older than version 14.18.1 it causes errors and it either does not install the node_modules or it does not build
When using the latest version of node 16.11.1 for me, it throws this while running the npm install
command
1
2
This is shown while building the code when using higher versions of node than 15.14.0
https://github.com/sass/node-sass/ is notorious for this type of crap because they use use c++. Should either be able to upgrade it (simplest) but may also be able to convert to dart-sass and be done with it (which might be easy or not).
So in summary:
- Try to remove node-sass dependency and replace it with dart-sass and see if that works. I think the only need for sass in this project is for https://github.com/activescott/cookieconsent/blob/dev/webpack.common.js#L32, but I'm not 100% positive, and I'm not sure if other changes need in webpack (different loader plugin?) to leverage dart-sass instead.
- If removing node-sass and switching to dart-sass isn't feasible, then upgrade node-sass to v6 (looks like their readme says that supports node v16+
- Add a node v16 build strategy at https://github.com/activescott/cookieconsent/blob/dev/.github/workflows/cicd.yml#L11. It shouldn't need to do anything except build & test.
You can try the above and submit a PR, or I'll take a look when I get around to it.
@activescott thanks a lot, this helped very much.
I'm re-opening this issue because it is a legitimate issue that should need fixed. I'd love it if someone submits a PR. If someone needs help to fix it, just tag me here with questions and I'll be happy to assist you in working through it!
๐ This issue has been resolved in version 6.0.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐