geerlingguy / ansible-role-nodejs

Ansible Role - Node.js

Home Page:https://galaxy.ansible.com/geerlingguy/nodejs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM version outdated

neilyoung opened this issue · comments

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.

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.

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