After creating a small library consisting of a .js file with commonly used functions, I placed it in the node_modules directory alongside my other packages. Everything seemed to be going well.
A few days later, I decided to add a new package using npm install. However, when I tested the program, I encountered errors indicating that my library was missing. Strangely enough, the library had disappeared from the node_modules folder, recycling bin, and even from my source control due to me ignoring the folder in gitignore.
Since I am relatively new to projects involving numerous files, I would appreciate it if someone could explain what might have caused this issue and provide advice on how to prevent it from happening again in the future.