I think I don't understand git and how to manage my package.json.
I have an older .Net Core 2.0 project that I am upgrading slowly to .Net 6. I have a git branch for this called newPlanGameUpgrade
. In that branch, I had to remove a package in my package.json called aspnet-webpack
because it's not compatiable with .Net 6.
So I did that, and got everything working in that branch.
But now, I just switched back to master to check something like this:
git checkout master
git pull origin master
I cleaned and rebuilt the solution, but I still get this error:
NodeInvocationException: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
So I am guessing that git doesn't save different versions of package.json?
Is there anything I can do?
Thanks!