Upon trying to remove the node_modules directory created by npm install
:
The source file name(s) are larger than is su
Try Visual Studio Code
After trying many solution i find this one is pretty simple. just open the project in Visual code and delete it. the UI may freeze for some seconds but it will definitely works.I test using many large size node_modules folder with it
Thanks
I've simply done that by using Winrar, this may seem a strange solution but working very well.
node_modules
folderAdd to archive ...
from the menu.delete files after archiving
DELETE only by using DOS command without any installation:
Create an empty folder "test" on C or D drive and use following DOS command
robocopy /MIR c:\test D:\UserData\FolderToDelete > NUL
After completing above command, your folder will be empty, now you can delete the folder.
Don't worry your test folder will always be empty, so you can delete it at any time.
npm install -g remove-node-modules
remove-node-modules
remove-node-modules path/to/folder
Source:
https://github.com/j-quelly/node-cleanup
What worked for me was:
then delete the node_modules
npm install rimraf -g
rimraf node_modules
From this looks of this MSDN article, it looks like you can now bypass the MAX_PATH restriction in Windows 10 v1607 (AKA 'anniversary update') by changing a value in the registry - or via Group Policy