Source Path Too Long #4820

Closed
pflannery opened this Issue Mar 1, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@pflannery

I've come across a scenario on Windows 7 that when trying to remove the node_modules folder through windows explorer or command\bash (rd or rmdir or rm) I get the error "Source Path Too Long, The source file names(s) are larger than is supported by the file system...blah blah blah"

The only way to remove it is by renaming a handful of node_modules folders in the chain to one letter and eventually I can remove it.

I found this issue using docpad-plugin-partials project.

To recreate:
First I run npm i then I run cake test-setup which is a task that invokes npm install node_modules/docpad (this is where problem is created)

This sucks especially as ntfs supports paths up to 32,000 characters in length.

What would be great is if we could have extra switch like npm clean or similar? this switch could use something like rimraf to clear out the node_modules folder.

@KenanY

This comment has been minimized.

Show comment
Hide comment
@KenanY

KenanY Mar 2, 2014

Member

I just use rimraf.

$ npm install -g rimraf
$ rimraf node_modules
Member

KenanY commented Mar 2, 2014

I just use rimraf.

$ npm install -g rimraf
$ rimraf node_modules
@ismay

This comment has been minimized.

Show comment
Hide comment
@ismay

ismay Jun 24, 2014

@KenanY

I've tried it, but that doesn't work for me. Returns an ENOTEMPTY error. However, on windows

rmdir /S /Q <dirname>

did work.

ismay commented Jun 24, 2014

@KenanY

I've tried it, but that doesn't work for me. Returns an ENOTEMPTY error. However, on windows

rmdir /S /Q <dirname>

did work.

@pflannery pflannery closed this Aug 30, 2014

@rhyek

This comment has been minimized.

Show comment
Hide comment
@rhyek

rhyek May 27, 2015

rimraf worked for me on Windows 8.1. rmdir did not.

rhyek commented May 27, 2015

rimraf worked for me on Windows 8.1. rmdir did not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment