1

For some reason, whenever I update or install a package in my project, NPM installs an empty etc folder and multiple .cmd files (see pic down below). It also doesn't update my package.json anymore, I have to manually update the version of the package NPM has updated.

The only thing I can remember that I changed, is adding the nodejs folder as a windows environment variable to access a global command. Other than that, I can't seem to remember doing anything that would allow NPM to do this weird behavior.

Anyone an idea what I might've done wrong? How can I fix this?

Thank you!

Update: I've noticed that adding the empty etc folder happens with each npm action. (npm install, publish, start, update, ..)

npm weird behavior of adding cmd files and empty etc folder

Cédric Bloem
  • 1,447
  • 3
  • 16
  • 34

1 Answers1

0

I solved it, but don't really understand how.

After a long search, I discovered all the above files are actually supposed to be in a .bin folder inside the node_modules. I uninstalled and reinstalled nodejs, didn't work.

In the end, I went to the folder where NPM stores its global files: C:\Users\username\AppData\Roaming\npm and emptied the folder. Now I can install, update or do any other action with NPM without the above result.

Cédric Bloem
  • 1,447
  • 3
  • 16
  • 34