

Source Path Too Long.

The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.

How To Remove Node_Modules Folder ?





To remove the node_modules folder, first we have to open the folder in command prompt. To do this just open your folder in which your node_modules folder is present. Then in the address bar just type in cmd and press enter. That's the easiest way to open cmd, thank us later if you didn't know. :P





Now the command prompt window will open up with your folder path. We will use rimraf package from npm to delete the node_modules folder. To install this package you need to type in below command in command window.









npm install rimraf -g





Now after installing rimraf, just type in below command to remove any specific folder. In our case it's node_modules



rimraf node_modules

After running this command you will notice that the folder gets deleted in a while. You need to wait little longer if you had more than 20 packages installed. So be patient.



Watch the video below, this will help you better



Try this and let us know if it helped.



Happy Learning!!! This will install rimraf in your machine globally. So that you need not to in stall it again ever. rimraf is used to delete the folders and is very popular among the npm users.Now after installing rimraf, just type in below command to remove any specific folder. In our case it's node_modulesAfter running this command you will notice that the folder gets deleted in a while. You need to wait little longer if you had more than 20 packages installed. So be patient.Try this and let us know if it helped.Happy Learning!!!

When a module is installed in a folder using NPM, then files related to that module are added into node_modules folder. But the problem is that it creates multiple hierarchical folder chain which leadswindows to show below error