Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

cache clear failing with ENOTDIR on Windows #3117

Closed
kschzt opened this issue Jan 31, 2013 · 5 comments
Closed

cache clear failing with ENOTDIR on Windows #3117

kschzt opened this issue Jan 31, 2013 · 5 comments

Comments

@kschzt
Copy link

kschzt commented Jan 31, 2013

rocket@ROCKET-PC ~/temp
$ npm install git://github.com/caolan/async.git
[email protected] node_modules\async

rocket@ROCKET-PC ~/temp
$ npm cache clear
npm ERR! Error: ENOTDIR, readdir 'C:\Users\rocket\AppData\Roaming\npm-cache_git
-remotes\git-github-com-caolan-async-git-b7546583\objects\pack\pack-d977c4987d04
365e1c92650e69b8187a16b6c99b.idx'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodej
s\node_modules\npm\bin\npm-cli.js" "cache" "clear"
npm ERR! cwd c:\Users\rocket\temp
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! path C:\Users\rocket\AppData\Roaming\npm-cache_git-remotes\git-github-
com-caolan-async-git-b7546583\objects\pack\pack-d977c4987d04365e1c92650e69b8187a
16b6c99b.idx
npm ERR! code ENOTDIR
npm ERR! errno 27
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\Users\rocket\temp\npm-debug.log
npm ERR! not ok code 0

@kschzt
Copy link
Author

kschzt commented Feb 1, 2013

Investigating this a bit further, it's actually caused by an EPERM from rimraf.

@kschzt
Copy link
Author

kschzt commented Feb 1, 2013

This is to do with the APPDATA folder being read-only. Writes work (Windows ...) and the deletion of some files works, but for some files it doesn't.. Duh. Solutions anyone?

@kschzt
Copy link
Author

kschzt commented Feb 1, 2013

If I run bash and rm -rf on the cache folder, that guy can delete it. ;-)

@kschzt
Copy link
Author

kschzt commented Mar 4, 2013

Looks like the underlying issue is nodejs/node-v0.x-archive#3006

kschzt pushed a commit to rocketpack/npm that referenced this issue Mar 4, 2013
@kschzt
Copy link
Author

kschzt commented Mar 4, 2013

sorry, the correct commit here is 886e2aa.

@kschzt kschzt closed this as completed Mar 4, 2013
isaacs pushed a commit that referenced this issue Mar 4, 2013
othiym23 pushed a commit that referenced this issue Jul 24, 2014
A previous fix for #3117
explicitly set the permissions for all files to a hard-coded
value, regardless of what the permissions were previously.

This changes that behavior to *add* the permissions that were
previously being *set* so that existing execute permissions are
maintained.

This is a redo of the much more blunt solution attempted in
#5728
thanks to some very helpful feedback from @othiym23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant