'The changes that I made on a new branch of my library are not reflected in my project

I'm currently working on a project that imports some functionality from a library that I created.

The package.json file of my project looks like this:

...
"dependencies"{
  "@sean/my-library":"1.4.0-SNAPSHOT",
...

The library mainly takes care of validation. One day, I noticed that there was a defect in my-library, so I created a new branch and switched to the new branch from the master by a command

git checkout -b fix-validation-issue

I made some modifications on the fix-validation-issue branch. I ran the following commands to reflect the changes to my-project, as the current version of my-project had cache of the master branch of my-library.

rm -rf node_module/ .angular/ package-lock.json (under my-project)
npm run pack (under my-library, and then copy the package and npm run install the package)
npm install (under my-project)
npm run build (under my-project)
npm start (under my-project)

Then the changes were reflected, so I switched back to master and merged the branch.

But a few days ago, I found another problem in my-library, so I created another branch to work on that.

git checkout -b handle-redundant-message

First I tried to find out the cause of the problem by setting a bunch of console.log statements to check the values of variables. I ran the series of commands that I mentioned above again to refresh the cache and reflect the changes. However, this time, none of the changes was reflected in my-project at all.

When changes on a new branch are not reflected on the project, what could be the cause?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source