2

I am struggling with npm:

I have 3 npm packages (typescript only), lets call them A (e.g. Server), B (e.g. Client) and C (e.g. stuff used across). All of them are saved in my GitHub. A and B are independent, C is included to both of them as a dependency via "package-c": "git+ssh://git@github.com:myname/package-c.git#main" (main is the only existing branch, tried with and without branch specification).

A and B have a pretty similar setup and package config, I don't believe that my issue derives from that.

The Issue: When I do npm i on A, it works totally fine, it installs the latest commit from GitHub. BUT when I do npm i on B something strange occurs: it installs a commit i pushed days ago!!

I cleared caches, deleted every node_modules folder, switches node versions, restarted, fetched again, reinstalled, checked every config, used cli/different IDEs, even made the package configs the same. It just won't work.

Can't explain this to me, so I neither have any idea what code to share with you guys. Such an issue never occurred.

I am thankful for any tips.

lsc
  • 375
  • 6
  • 15

1 Answers1

3

As mentioned in other posts npm update package-c and than npm install does the job.

Still no idea why npm install without updating worked for A and why B installed a commit which was pushed days ago … but at least it worked.

lsc
  • 375
  • 6
  • 15