I wrote up a small library, just a .js file with some frequently used functions, and dropped it into the node_modules folder so it was alongside all of my other packages. Great.
A few days later, I added a new package with npm install. When I ran the program to test it, I got errors for my library missing, and sure enough it was no longer in the node_modules folder, recycling bin, or even appearing in my source control because I gitignore'd the folder.
As someone who's new to projects that use more than a handful of files, could someone please explain what may have caused this, and how I can prevent it in the future?