Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ENOENT: no such file or directory, rename

Tags:

I have just started working with angular2. Ubuntu 14.04 VMplayer Shared Folder devcode

I am running ubuntu on VM windows host, used shared folders on Linux to get windows hosted folder and files into Linux development environment.When I try to do npm install for dependencies Hit npm install in terminal

54094 verbose stack Error: ENOENT: no such file or directory, rename '/mnt/hgfs/devcode/angularApp/node_modules/.dashdash.DELETE/node_modules/assert-plus' -> '/mnt/hgfs/devcode/angularApp/node_modules/dashdash/node_modules/assert-plus'
54095 verbose cwd /mnt/hgfs/devcode/angularApp
54096 error Linux 4.4.0-31-generic
54097 error argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install"
54098 error node v7.6.0
54099 error npm  v4.1.2
54100 error path /mnt/hgfs/devcode/angularApp/node_modules/.dashdash.DELETE/node_modules/assert-plus
54101 error code ENOENT
54102 error errno -2
54103 error syscall rename

After dir and ls enter image description here

like image 566
Waqas Ahmed Avatar asked Mar 04 '17 10:03

Waqas Ahmed


1 Answers

This looks like npm issue #17444 (which is probably several different issues, actually). The things you should try to resolve it are:

  1. Remove your package-lock.json and let npm recreate it with (usually slightly updated) versions of packages. This is what worked for me recently. If you're not committing your package-lock.json you should be doing so, but why is a matter for another question.

  2. Ensure that you've exited any programs such as Visual Studio Code or other things that might be holding locks on the files. This is not likely to be much of a problem on Linux (or anything with POSIX filesystem semantics), but definitely can be a problem on Windows.

  3. Ensure that you're using a local filesystem and not a network filesystem of some sort (that, again, may not have POSIX semantics).

like image 63
cjs Avatar answered Sep 24 '22 10:09

cjs