Open RossChaudhry opened 1 year ago
My issue looks related to here (https://github.com/npm/cli/issues/681), but I'm hesitant to just start running commands eg. RUN npm install -g npm@latest
because I don't have enough background.
I learned more about my issue and have the following resolution. Posting here so others can see and to see if anybody has final feedback - I'm still a novice with these kinds of tools.
Based on this post (https://github.com/npm/cli/issues/681) the versions of npm and nodejs that come with Ubuntu 18.04 is too old. Per here (https://github.com/nodesource/distributions/blob/master/README.md) building on Ubuntu 18.04 is broken for nodejs 18 and up, and here (https://nodejs.org/en/blog/) says nodejs 16.18.1 is LTS, so I plan to install that. I uninstalled what I had previously installed with apt (maybe not necessary) with apt remove
and apt autoremove
, then from (https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04):
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash
which failed near the end because the GPG key was set to the incorrect permissions (https://github.com/nodesource/distributions/issues/1181), so:
sudo chmod 644 /usr/share/keyrings/nodesource.gpg
Once the permissions were fixed, I re-did the curl command and then simply sudo apt install nodejs
.
I am new to nodejs and I am having trouble installing the package on Ubuntu 18.04 (LTS). I have just installed
nodejs
andnpm
with:The output of
npm i
is:I can include the npm debug log if necessary (it's half a MB). My guess is some package version mismatch (18.04 is getting old). Thanks!