geerlingguy / ansible-role-nodejs

Ansible Role - Node.js
https://galaxy.ansible.com/geerlingguy/nodejs/
MIT License
410 stars 252 forks source link

NPM version outdated #136

Closed neilyoung closed 1 year ago

neilyoung commented 2 years ago

Thanks for this role, but would there also be a way to setup NPM to an appropriate version?

I have set nodejs_version: "14.x" and this works, but no 18.04 the installed NPM is 6.14.17. That is definitely too old, npm install hangs every now and then forever. An upgrade to npm 8.13.2 recovers from that.

geerlingguy commented 1 year ago

Since this role installs the version that goes along with nodesource's distributions for different OSes, that may be an issue with their packaging. I know nodesource has had some build troubles on Ubuntu versions older than 20.04 lately, and that might be the problem.

neilyoung commented 1 year ago

I solved that by installing an up to date npm version manually