Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass Generator not working out of the box #296

Open
sschleemilch opened this issue May 19, 2021 · 1 comment · May be fixed by #309
Open

Sass Generator not working out of the box #296

sschleemilch opened this issue May 19, 2021 · 1 comment · May be fixed by #309

Comments

@sschleemilch
Copy link

sschleemilch commented May 19, 2021

Hi,

I noticed that on a fresh Arch Linux installation, the express generator for the sass css engine is not working anymore.
That's probably because of missing support on the node-sass-middleware which seems to be quite out-of-date and not working properly anymore.

Has anyone a suggestion how to port the behavior to have a working sass middleware again with the most recent node?
Anyway, here is my setup to reproduce it:

Environment:

  • node -v -> v16.1.0
  • node-gyp -v -> v8.0.0
  • npm -v-> 7.13.0
  • express --version -> 4.16.1
  • uname -a -> Linux barch 5.12.3-arch1-1 #1 SMP PREEMPT Wed, 12 May 2021 17:54:18 +0000 x86_64 GNU/Linux

Steps:

  • express -c sass test
  • cd test
  • npm install

Error:

...........
npm ERR! /home/sebastian/.node-gyp/16.1.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t>::value>::Perform(data);
npm ERR! | ^~~~~~~~~~~
npm ERR! | remove_cv
npm ERR! /home/sebastian/.node-gyp/16.1.0/include/node/v8-internal.h:452:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t>::value>::Perform(data);
npm ERR! | ^~~~~~~~~~~
npm ERR! | remove_cv
npm ERR! /home/sebastian/.node-gyp/16.1.0/include/node/v8-internal.h:452:50: error: template argument 2 is invalid
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t>::value>::Perform(data);
npm ERR! | ^
npm ERR! /home/sebastian/.node-gyp/16.1.0/include/node/v8-internal.h:452:63: error: ‘::Perform’ has not been declared
npm ERR! 452 | !std::is_same<Data, std::remove_cv_t>::value>::Perform(data);
npm ERR! | ^~~~~~~
.................

Interesting is also that in the end it reports about versions of node and node-gyp but reports the wrong node-gyp version in my opinion:

npm ERR! gyp ERR! node -v v16.1.0
npm ERR! gyp ERR! node-gyp -v v3.8.0

Every bit of help appreciated. Just want to change something on my personal website and can't start it anymore on a fresh setup without probably downgrading npm. But is this really the root cause?

S-

@p4nu
Copy link
Contributor

p4nu commented May 28, 2022

This is due to node-sass dependency wanting python2 and older nodejs to be installed. This should be changed to dart-sass according to their official docs: https://www.npmjs.com/package/node-sass

p4nu added a commit to p4nu/expressjs-generator that referenced this issue May 28, 2022
This closes issues:
Running tests locally fails expressjs#308
and
Sass Generator not working out of the box expressjs#296
@p4nu p4nu linked a pull request May 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants