What happens when you run "npm install"?

#1
Does it simply look at package.json and replace folders in node_modules? If so, can anyone help me understand why the following is happening -

I had to make a change to a dependency so I forked the folder in Github, made the change, updated package.json. At first, I wanted to avoid npm install for certain reasons. So I deleted the old folder in node_modules and replaced it with the new forked folder omegle xender . The change did not take effect. Then I ran npm install and the change took effect.

But if npm install just updates the folders in node_modules, and I did it manually at first, why didn't it work? I rebuilt everything after.
 
Last edited:
Top