Wednesday, 15 March 2017

node_modules folder in an ASP.NET Core MVC project

I've recently upgraded my netcoreapp1.0 to netcoreapp1.1. This left me wit ha few surprises and error that needed to be fixed. On top of that, I recently got a new PC, which forced me to go through even more things.

First up I had to install NodeJS again, and from the node package manager, install bower. After installing both NodeJS and bower, and several hours after working on my project, I realized, as I had to commit the changes to remote source control, that a node_modules folder had appeared (though hidden) in my project. Git of course wants to commit this folder, but I'd rather not since it contains loads of subfolders and other items.

Hidden node_modules folder

Git changes for commit

I was wondering what to do with this folder. I believe it shouldn't be there? And I'm not sure why it is. Shouldn't it be global or something, specific from PC to PC? Or should I just add it to my .gitignore file?

Quick info: It wasn't there prior to the upgraded project, meaning that I couldn't see any node_modules folder in netcoreapp1.0 and there's no folder in my source control?



via Detilium

No comments:

Post a Comment