Upgrade from 3.0.3 to 3.0.4 breaks meteor npm install

I had a working 3.0.3 installation and tried to update it to 3.0.4.

My bash script always does a meteor npm i before running the server, to ensure all packages are ok even if I switch branches.

After upgrading to 3.0.4., I first got the warning that my package-lock.json had an old version and was upgraded. Afterwards, npm i completely failed due to dependency errors.

So I tried to rollback everything back to 3.0.3, by setting my git repo back to the original version. However, this did not help, I am still getting these errors. Even restoring the repo from a Time Machine Backup did not change this.

It seems as if Meteor installed a new version of Node / npm and now always uses this instead of the one shipped with 3.0.3, even if the repo is still on 3.0.3. It seems to be enough to have updated the Meteor tools to 3.0.4 once.

How can I resolve this situation?

I was able to resolve the dependency issues. Still wondering why an update of the Meteor CLI causes even older app versions to use a more recent Node version?

That seems to have also happened here:

That shouldn’t happen, if I remember correctly Meteor should route the node version the specific version the app is using… I don’t think we upgraded Node.js or altered any logic from 3.0.3 to 3.0.4, we will investigate.

1 Like

One thing you can try is to completely delete ~/.meteor and reinstall it and see if it behaves properly

1 Like

Thanks for the swift response. Highly appreciated. I have re-installed Meteor 3.0.3, but this didn’t help much. It turned out that the root cause was some invalid dependencies that were unnoticed because npm i did not report them until the meteor update installed a new Node version. After I fixed the dependencies (by downgrading from React 18 to 17), I could npm i again and even upgrade the server to 3.0.4.

However, I am still clueless how the first tried update to 3.0.4 forced my app to update the package-lock.json and then got stock in the failing dependency resolving step. Sometimes, npm is a mystery to me. Especially if you don’t even get an error about the dependencies earlier.

We normally encounter this error when using

meteor npm (meteor installed npm)

vs

npm (globally installed npm)

And these two are on different npm versions.