Upon trying to remove the node_modules directory created by npm install
:
The source file name(s) are larger than is su
On Windows, using Total Commander all you have to do is select the folder click shift + delete . Don't forget about the shift key.
(I would prefer to avoid installing a new extension (rimraf) when working with CI environments.)
npm init
- this will create an empty packages.json
file (no dependencies)npm prune
- this will match node_modules with the dependencies section of packages.json
- which is now empty as the result of step #2.packages.json
, and rename original packages.json
back to its original name.I used GitBash to remove de folder!
rm -r node_modules
It took a while to delete everything, but worked for me!
Just use powershell..
Run powershell and cd to the parent folder and then:
rm [yourfolder]
as in:
rm node_modules
You can use Git Bash to remove the folder:
example: c:\users\stu\projects\mynodeproject
rm /c/users/stu/projects/mynodeproject -rfd
Since this the top google result, this is what worked for me:
Install RimRaf:
npm install rimraf -g
And in the project folder delete the node_modules folder with:
rimraf node_modules
If you want to recursively delete:
rimraf .\**\node_modules
[ http://www.nikola-breznjak.com/blog/nodejs/how-to-delete-node_modules-folder-on-windows-machine/ ]