Home > Mobile >  npm install suddenly uses a different package version than the forked one that is in package.json &
npm install suddenly uses a different package version than the forked one that is in package.json &

Time:11-13

Since a few days, our aws elastic beanstalk fails to deploy our code through npm Install. We are using our own fork from parse-server repo, and it always worked fine.

Unfortunately it now fails without obvious reason. When looking at the instance logs it clearly shows it tries to use the original parse-server repo (on a very old branch) instead of our very own fork, but I can't figure why.

Our package.json file indicates:

"parse-server": "git https://github.com/hulab/parse-server.git#patched/5.3.0-hulab-2"

and our npm-shrinkwrap.json file reflects it with a

"parse-server": {
      "version": "git https://github.com/hulab/parse-server.git#54bfd65181f19d4296f0ebea79cf3a4ab542f2fc",
      "from": "git https://github.com/hulab/parse-server.git#patched/5.3.0-hulab-2",
...
}

Whereas the EC2 instance logs indicate failures when installing:

parse-server@github:parse-community/parse-server#892c6f94d50b6dced8a5e1948e058dc7b095c914

I can't figure out why this branch is used while not being referred to in any of our files!

Any help would be very appreciated :)

CodePudding user response:

It is likely another dependency that points to that specific version of Parse Server.

For example, the Parse JS SDK has a devDependency:

"parse-server": "github:parse-community/parse-server#alpha"

Since you are using a customized version of Parse Server, check the Parse JS SDK (which is a component of Parse Server), and any other Parse dependency that you added, to where it points. In package.json you may only see the branch name but in package-lock.json of that dependency you may see the actual commit hash you are referring to.

  • Related