DEV Community

geniot
geniot

Posted on

Node.js - What a mess...

So I've been trying to fix my build server where I run an Angular build. For some reason it got broken and I had to revisit the installation of nvm, nodejs, ng.

Curiously trying to install ng with
npm install -g @angular/cli
resulted in a thousand of errors.

For some unknown reason npm was trying to compile node-sass with g++! The root cause was g++ not found. Ok, I know how to install g++ on Linux. But the next attempt resulted in even more ridiculous errors: make failed because g++ failed to compile some c++ code.

And all of this when just trying to install Angular.

At this point I realized that I probably was trying to install Angular the old way:
npm install -g angular-cli

And that it probably mattered.

So I tried the new way:
npm install -g @angular/cli
and it seemed to work.

But then and all the way along this painful process I received errors like:
File exists: /home/vitaly/.nvm/versions/node/v16.14.2/bin/ng
or
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)

Finally I had to install a lower version of angular cli to make it work:
npm install -g @angular/cli@16.2.10

What a mess! I keep repeating this as I look at Node.js, npm and Angular compatibility and installation process.

If you don't trust my opinion read through the answers of this question at Stackoverflow:
https://stackoverflow.com/questions/72921215/getting-glibc-2-28-not-found

This is woodoo. And it smells like enterprise, bureaucracy and a big piece of sh*t.

Top comments (0)