Npm WARN read-shrinkwrap

I’ve gotten a warning from npm

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!

It would be my guess that I am using a later version of npm on my PC (where I developed the app) than is running on Glitch. Is there a) a way to confirm that b) a way to update npm? Or for that matter c) am I mistaken?

That sounds right. npm did change its package-lock.json format in version 7.

package-lock.json | npm Docs (npmjs.com)

It says here that the version is in the lockfileVersion field, so you can look at that to confirm.

Supposedly you’d install upgrade by having the old npm install the new npm as a package. On Glitch, you must install not -g globally, but that doesn’t seem like it would stop anything from working.

I have heard that upgrading pnpm leads to trouble though.

Appreciate it. I’m using the latest version of everything for development and the version is 2 which the warning mentioned. So the question I think I have is how and when will Glitch update to the latest version?

I was hoping to hear an official reply from Glitch re: the following. It is related to the version of npm. We can see the report of 6.14.9 but the latest version is around 7.5.6. Will npm be officially updated or must I find a workaround?

Thanks.

node v14.15.2, npm 6.14.9
Installing…
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
audited 86 packages in 13.742s
found 0 vulnerabilities

Hi there - so the version of npm on Glitch containers is tied to the version of Node being used. We’re in the process of working on our Node updating policy, so at the moment I don’t have a date for when the LTS version will be updated, but I’ll make an announcement in here when that timeline becomes more clear to me!

Thanks Jenn. I look forward to the announcement. Keeping current on all these libraries and tools is almost a daily effort.