Why does "git checkout ." not change the node_module packages I entered by npm?

Asked

Viewed 45 times

0

I did a little "caca" in my test environment, and my system just bugged out, because npm is giving some bugs:

Git Bash: inserir a descrição da imagem aqui

Console do Google Chrome:

inserir a descrição da imagem aqui

By Filezilla I have the old packages, the old package.json and the old node_module, but I found it strange doing git checkout I can’t get back to my state when I did the last commit.

Note: from what I saw in some programming forums and gringo stackoverflow, I would only have to reinstall some packages, but it is not giving the expected result.

1 answer

2

By convention, the folder node_modules/ is ignored in the versioning of some projects, so it is not affected by the commands of Git.

You can check in the file .gitignore, the path of this folder being there, it is ignored.

If this is your case, to reinstall the dependencies, you can delete the folder node_modules/ and rotate the npm install again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.