0

I'm working on a react js project with this spec:

node -v --> v16.15.1
npm -v --> 8.11.0

I usually install packages with npm install package-name --legacy-peer-deps and uninstall it with npm uninstall package-name --legacy-peer-deps which usually works fine.. but in one of the recent package I installed, I copied the command from the website and I remember there was --save keyword in it. now I want to uninstall it since I don't use it anymore so I ran this commands:

npm uninstall package-name --legacy-peer-deps
npm uninstall package-name --save --legacy-peer-deps

but the package name is still in the package.json file. what should I do to completely remove the package from my react js appliation?

dapidmini
  • 1,490
  • 2
  • 23
  • 46
  • 1
    For a quick solution just remove package name form `package.json` from dependencies. – krishn kumar modanval Aug 17 '22 at 16:46
  • `--save` does not do anything special anymore, it is now the default behavior so same thing happens whether you use it or not. https://www.geeksforgeeks.org/what-is-the-meaning-of-save-for-npm-install/ – dmikester1 Aug 17 '22 at 16:53

1 Answers1

0

remove it from your package.json and run npm install

Rob Terrell
  • 2,398
  • 1
  • 14
  • 36