Please help: `yo angular` gives ENOENT errno 34 #4764

Closed
randwa1k opened this Issue Feb 23, 2014 · 15 comments

Comments

Projects
None yet

On a brand new directory, I cleaned out npm cache (npm cache clean) and created the empty .npmignore file then installed npm install -g yo and npm install -g generator-angular. I ran npm cache clean again before calling yo angular, but I get these on my stderr.log:

npm ERR! Error: ENOENT, lstat '/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/app_e
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js
npm ERR! fstream_path /home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/graceful-fs

Here is writer.js:284.
There is no npm-debug.log in the directory. (Why not?)

Here is the context of this error.

Here is the history of ALL the commands, in chronological order, that I ran on a brand new Ubuntu Server 12.04.3, so you can see exactly what led up to this point, and where I have installed various packages.


I've tried yo angular again, and it gave another ENOENT error without having the npm-debug file at the end. Here is the context of the error.

npm ERR! Error: ENOENT, chmod '/home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/app_f
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js
npm ERR! fstream_path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)

Here is writer.js:305.

What is causing these ENOENT errors?

How come the ENOENT errors were at different places each time?

How come there are no npm-debug files?

Contributor

davglass commented Feb 25, 2014

I'm seeing this on my CI builds too, totally clean cache on each run.

rootical commented Apr 2, 2014

Same here. Latest OSX

I'm seeing this on my CI builds too, totally clean cache on each run.

Me too! Imusing StriderCD, and have to run npm cache clean before each build.
It hurts speed and traffic.

Ubuntu 13.10
npm  1.3.8

Any solution? same thing on Windows 7 machine

Ha! I managed to fix it too just after posting this comment. I added what I could remember to the stackoverflow link above

Contributor

othiym23 commented Jun 10, 2014

See #5453. I believe this to be a race condition within npm, but haven't yet been able to isolate it.

cebor commented Jun 10, 2014

also got erros while running yo angular: https://gist.github.com/cebor/f4c2c1b1444a42079f2b

+1 for this error. Adding a .npmignore file fixed my problem, but I don't know the cause

Tyguy7 commented Jun 23, 2014

Having the exact same issues. Seems like a major Yeoman bug.

-1 adding a .npmignore file, did not fix the problem

eranimo commented Aug 26, 2014

I'm having the exact same problem. All the other tricks for npm errors do not work. I cleared the NPM cache, made sure permissions were correct, deleted the ~/.npm/ folder, prayed to Zeus, nothing worked.

What did you add to the .npmignore file to make it work?

Tyguy7 commented Aug 26, 2014

@eranimo My issue actually ended up being that I was running yeoman in my virtual machine instead of my host machine. After i started using yeoman in windows instead of ubuntu vm, everything worked as expected.

eranimo commented Aug 26, 2014

Good catch, but that still didn't help. Now I get a ENOTEMPTY error. Latest version of node and npm. Tried all of the above again.

Owner

iarna commented Sep 16, 2014

Thank you all for your patience– we believe that this is fixed in #6043, please try again with npm@2.0.0 or npm@1.4.28.

@iarna iarna closed this Sep 16, 2014

m0cs commented Oct 2, 2014

People try install git client, check command git is working. That was my bad.

Good luck!

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