cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] 'npm install' deletes custom node modules

Open Olafcio1 opened this issue 2 months ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

This issue exists in the latest npm version

  • [x] I am using the latest npm

Current Behavior

my custom node_module got deleted after doing npm install -D vite, its not vite's fault, everything from npm would delete it

Expected Behavior

well, my stuff shouldnt be gone

Steps To Reproduce

  1. make a node_modules diretory with a new folder in it, put anything you want in it, like an important part of your app 2.npm install anything, like npm install -D vite 3.boom your code is gone

Environment

  • npm: all versions
  • Node.js: v22.11.0
  • OS Name: windows 10
  • System Model Name: windows?
  • npm config: ``

Olafcio1 avatar Oct 26 '25 12:10 Olafcio1

I would like to contribute here, I request you to assign me

nikunj-kohli avatar Oct 28 '25 03:10 nikunj-kohli

@nikunj-kohli are you already working on the issue?

Abishek-Newar avatar Oct 29 '25 11:10 Abishek-Newar

@nikunj-kohli are you already working on the issue?

yes i am, will raise a pr in some hours

nikunj-kohli avatar Oct 30 '25 04:10 nikunj-kohli

Hi @kchindam-infy, is this in progress or can I work on it ?

saksham-malhotra-27 avatar Dec 16 '25 21:12 saksham-malhotra-27