Skip to content
This repository has been archived by the owner. It is now read-only.

Got ENOENT error when trying to install modules #3664

Closed
srmor opened this issue Jul 16, 2013 · 69 comments
Closed

Got ENOENT error when trying to install modules #3664

srmor opened this issue Jul 16, 2013 · 69 comments

Comments

@srmor
Copy link

@srmor srmor commented Jul 16, 2013

When I did npm install on a repo I got the following error:

15684 silly gunzTarPerm extractEntry examples.js
15685 silly gunzTarPerm extractEntry index.js
15686 error Error: ENOENT, open '/var/folders/c5/qdnbg_817vz1tnfvrbzwc6200000gp/T/npm-33836/1373983333743-0.11652350216172636/package/package.json'
15687 error If you need help, you may report this log at:
15687 error     <http://github.com/isaacs/npm/issues>
15687 error or email it to:
15687 error     <npm-@googlegroups.com>
15688 error System Darwin 12.4.0
15689 error command "node" "/usr/local/bin/npm" "install"
15690 error cwd /Users/stephenmorrison/Sites/wiseradar/wiseradar
15691 error node -v v0.10.13
15692 error npm -v 1.3.2
15693 error path /var/folders/c5/qdnbg_817vz1tnfvrbzwc6200000gp/T/npm-33836/1373983333743-0.11652350216172636/package/package.json
15694 error code ENOENT
15695 error errno 34
15696 verbose exit [ 34, true ]

My npm version is 1.3.2 and my node version is 0.10.13. Any ideas?

@KingScooty
Copy link

@KingScooty KingScooty commented Jul 16, 2013

I'm getting similar errors when trying to install/update modules:

npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g"
npm ERR! cwd /Users/KingScooty
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! path /var/folders/f5/0qftllzs59n2njz8b89135sc0000gn/T/npm-517/1373986154903-0.9633553579915315/package/lib/flatiron/cli/create.js
npm ERR! code EMFILE
npm ERR! errno 20
npm http 200 https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz
npm http 304 https://registry.npmjs.org/keypress
npm http 200 http://github.com/cowboy/grunt/archive/0ba6d4b529.tar.gz
npm http 200 https://registry.npmjs.org/semver/-/semver-1.0.14.tgz
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/ansi-color
npm http 304 https://registry.npmjs.org/date-utils
npm http 304 https://registry.npmjs.org/mute-stream
npm ERR! Error: EMFILE, too many open files
npm ERR!     at new Glob (/usr/local/lib/node_modules/npm/node_modules/glob/glob.js:105:21)
npm ERR!     at glob (/usr/local/lib/node_modules/npm/node_modules/glob/glob.js:57:11)
npm ERR!     at gypfile (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:133:17)
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:118:33
npm ERR!     at Array.forEach (native)
npm ERR!     at extras (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:117:21)
npm ERR!     at parseJson (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:86:17)
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:58:33
npm ERR!     at fs.js:266:14
npm ERR!     at Object.oncomplete (fs.js:107:15)
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!     <npm-@googlegroups.com>

npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g"

/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:266
  log.error("cwd", process.cwd())
                           ^
Error: EMFILE, too many open files
    at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:266:28)
    at process.EventEmitter.emit (events.js:117:20)
    at process._fatalException (node.js:272:26)

@19h
Copy link

@19h 19h commented Jul 16, 2013

@srmor This happens due to missing permissions or unlinked files while npm was working.
@KingScooty See https://github.com/isaacs/npm/issues/3259 — this issue will be fixed in the next release.

@srmor
Copy link
Author

@srmor srmor commented Jul 16, 2013

@KenanSulayman Hmm... ok. So any ideas on how to make it work? I tried using sudo npm install and that didn't change anything.

@phillipalexander
Copy link

@phillipalexander phillipalexander commented Jul 20, 2013

+1 I'm having the same issue

@luk-
Copy link
Contributor

@luk- luk- commented Jul 20, 2013

If you're having permissions issues from prior installs before permissions
were corrected, try removing .npm in your home directory and attempting
the install again. If it's a file descriptor limitation issue the problem
likely lies elsewhere.

On Friday, July 19, 2013, Phillip Alexander wrote:

+1 I'm having the same issue


Reply to this email directly or view it on GitHubhttps://github.com/isaacs/npm/issues/3664#issuecomment-21288551
.

@Florian79
Copy link

@Florian79 Florian79 commented Jul 22, 2013

I have a similar issue after calling npm install (feebs)

node-expat@2.0.0 install C:\development\node\bit-test\node_modules\feebs\node_
modules\xml2json\node_modules\node-expat
node-gyp rebuild

C:\development\node\bit-test\node_modules\feebs\node_modules\xml2json\node_modul
es\node-expat>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin.
...\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:
34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\development\node\bit-test\node_modules\feebs\node_modules\xml2js
on\node_modules\node-expat
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok
unbuild node-expat@2.0.0
unbuild xml2json@0.3.2
unbuild feebs@0.5.1
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\development\node\bit-tes
t\node_modules\feebs\node_modules\express\node_modules\connect\node_modules\qs\l
ib'
npm ERR! error rolling back feebs@0.5.1 { [Error: ENOTEMPTY, rmdir 'C:\developm
ent\node\bit-test\node_modules\feebs\node_modules\express\node_modules\connect\n
ode_modules\qs\lib']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: 'C:\development\node\bit-test\node_modul
es\feebs\node_modules\express\node_modules\connect\node_modules\qs\lib'
}
npm ERR! weird error 1
npm ERR! Error: ENOENT, lstat 'C:\development\node\bit-test\node_modules\feebs\n
ode_modules\express\node_modules\connect\node_modules\qs\lib\querystring.js'
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! npm-@googlegroups.com

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd C:\development\node\bit-test
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! path C:\development\node\bit-test\node_modules\feebs\node_modules\expre
ss\node_modules\connect\node_modules\qs\lib\querystring.js
npm ERR! fstream_path C:\development\node\bit-test\node_modules\feebs\node_modul
es\express\node_modules\connect\node_modules\qs\lib\querystring.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
unbuild connect@2.7.5
unbuild express@3.1.2
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\development\node\bit-test\npm-debug.log
npm ERR! not ok code 0

@silverwind
Copy link

@silverwind silverwind commented Jul 22, 2013

I've been getting random ENOENT / ENOTEMPTY all over the place on Windows when trying to install packages on npm 1.3.4. npm kept looping for more than 30 minutes trying to install just 10 packages.

Downgrading node to 0.10.9 and npm to 1.2.24 fixed it for now, so I think this may be an regression somewhere between those versions.

From my experience, these random errors come from opening too many file handles at once on Windows. I remember setting graceful-fs's fs.MAX_OPEN to 256 remedied these errors, at least on for my app, so that might be worth a shot.

@astefas
Copy link

@astefas astefas commented Jul 23, 2013

I am not really a node or npm expert, but I encountered this Errors also. Like 'ERR! code EMFILE'. I resolved this by only updating grunt : 'sudo npm update [-g] grunt'. Then I deleted .npm and after that 'sudo npm update' did not throw any errors. Maybe this helps...

@astefas
Copy link

@astefas astefas commented Jul 23, 2013

actually it was this error:

npm ERR! code EMFILE
npm ERR! errno 20

and i tracked it down to grunt because yeoman is not running correctly on my machine, always failing when executing grunt

@jameswyse
Copy link

@jameswyse jameswyse commented Jul 28, 2013

I've been seeing these errors a lot recently too with the latest node/npm on OS X. Removing ~/.npm seems to have fixed everything!

@silverwind
Copy link

@silverwind silverwind commented Jul 28, 2013

What's the equivalent of ~/.npm on Windows?

@ricardograca
Copy link

@ricardograca ricardograca commented Jul 29, 2013

I'm also experiencing the exact same ENOENT error as the OP on Ubuntu 12.04, but only when installing from a github repository.

@domenic
Copy link
Contributor

@domenic domenic commented Jul 29, 2013

@ricardograca you probably don't have git installed (or if you do it's not in your PATH). If you are on a newer version of npm it should tell you this.

@ricardograca
Copy link

@ricardograca ricardograca commented Jul 29, 2013

@domenic That's not it. git is installed and is in the PATH. Not that it matters because the access to the server isn't even being done with git.

@ricardograca
Copy link

@ricardograca ricardograca commented Jul 29, 2013

Ok, so the problem was that I was trying to use https://github.com/... instead of git://github.com/... because github no longer generates links for git://, only for https and ssh. Not sure if it's the same problem the OP was having, because in my case there was only a index.js file extracted before the package.json error and that file actually contained html.

@shroomist
Copy link

@shroomist shroomist commented Aug 14, 2013

rm -rf ~/.npm helped me out, thatks.

@domenic domenic closed this as completed Aug 14, 2013
@okonet
Copy link

@okonet okonet commented Sep 3, 2013

I still have this issue doing npm install on npm 1.3.8, even after doing rm -rf ./~npm

Here is a recent log I've got:

npm ERR! weird error 1
npm ERR! Error: ENOENT, open '/Users/jetbrains/buildAgent/temp/buildTmp/npm-64997-D8rXPGF8/1378204469803-0.7390178274363279/package/package.json'
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!     <npm-@googlegroups.com>
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jetbrains/buildAgent/work/78bd345f717dbab0/webui
npm ERR! node -v v0.10.17
npm ERR! npm -v 1.3.8
npm ERR! path /Users/jetbrains/buildAgent/temp/buildTmp/npm-64997-D8rXPGF8/1378204469803-0.7390178274363279/package/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! Error: ENOENT, lstat '/Users/jetbrains/buildAgent/temp/buildTmp/npm-64997-D8rXPGF8/1378204470644-0.09840521146543324/package/test/eyes-test.js'
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!     <npm-@googlegroups.com>

Any workaround?

@ricardograca
Copy link

@ricardograca ricardograca commented Sep 3, 2013

@okonet Have you looked at the files under /Users/jetbrains/buildAgent/temp/buildTmp/npm-64997-D8rXPGF8/1378204470644-0.09840521146543324? If you analyze them you'll probably find out what the actual problem is.

@mpj
Copy link

@mpj mpj commented Oct 22, 2013

"rm -rf ~/.npm" did it for me.

@aarsilv
Copy link

@aarsilv aarsilv commented Oct 29, 2013

On Windows 7, I did the following to overcome this. Pretty sure that not all the steps are needed but I wasn't patient enough to try one at a time :-P

  • deleted the node_modules folder
  • deleted C:\<Username>\AppData\Roaming\npm-cache folder
  • unchecked and applied Read-only in the properties for C:\<username>\AppData\Roaming\npm folder

Note AppData is a hidden folder, so you may need to enable viewing of hidden files and folders to access it.

@machunter
Copy link

@machunter machunter commented Nov 1, 2013

i ran into a similar problem, npm cache clean solved it.

@TJKoury
Copy link

@TJKoury TJKoury commented Nov 24, 2013

Windows 8 x64, can confirm npm cache clean worked for me.

@jrode
Copy link

@jrode jrode commented Dec 9, 2013

Yup, Windows 7 x64, npm cache clean solved it

@Vahanerevan
Copy link

@Vahanerevan Vahanerevan commented Dec 30, 2013

npm cache clean solved.

@calbertts
Copy link

@calbertts calbertts commented Jan 3, 2014

I got this error installing devtools-terminal, I've resolved running the terminal like Admin on Windows 8.

@reggi
Copy link
Contributor

@reggi reggi commented Mar 14, 2014

yes npm cache clean 👍

@patdavid
Copy link

@patdavid patdavid commented Aug 11, 2014

@jamescrowley had a solution that worked for me. Fresh, brand new installation on Win7 64bit using node-v0.10.30-x64.msi.

npm didn't work, errored with: Error: ENOENT, stat 'C:\Users\USERNAME\AppData\Roaming\npm'

The reason was that this folder didn't exist. I manually created the npm folder in that location, and now things appear to be working.

@LongLiveCHIEF
Copy link

@LongLiveCHIEF LongLiveCHIEF commented Aug 11, 2014

Node can create folders... and if we are using an installation prefix,
permissions (your problem), shouldn't cause an error.
On Aug 11, 2014 9:55 AM, "patdavid" notifications@github.com wrote:

@jamescrowley https://github.com/jamescrowley had a solution that
worked for me. Fresh, brand new installation on Win7 64bit using
node-v0.10.30-x64.msi.

npm didn't work, errored with: Error: ENOENT, stat
'C:\Users\USERNAME\AppData\Roaming\npm'

The reason was that this folder didn't exist. I manually created the npm
folder in that location, and now things appear to be working.


Reply to this email directly or view it on GitHub
#3664 (comment).

@othiym23
Copy link
Contributor

@othiym23 othiym23 commented Aug 11, 2014

I'm pretty sure this is an issue in the Node installer for Windows. The whole reason that npm uses $USERNAME\AppData\Roaming\npm is that non-administrative roles can write to the latter but not the application directory where Node (and npm) are originally installed. Since creating that directory if it doesn't exist does require Administrator privileges, npm -g install <whatever> won't / can't work. I'll open an issue on Node for this.

@ghost
Copy link

@ghost ghost commented Aug 12, 2014

I had the following error on fresh installation of node.js under Windows Server 2012 R2:

Microsoft Windows Version 6.3.9600 2013 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Windows\system32>npm
Error: ENOENT, stat 'C:\Users\Administrator\AppData\Roaming\npm'

The Solution is to create the given folder manually for every user

@LongLiveCHIEF
Copy link

@LongLiveCHIEF LongLiveCHIEF commented Aug 12, 2014

Yeah... no... If you are a windows user, you get this error for a totally valid reason. The solution is not "to create the given folder manually for every user". First, you have to understand what's happening, and on windows, if you aren't using Powershell or whatever shell you're using as admin, node won't have permissions to create the root folder for npm or node_modules.

Manually creating the folder is not a fix. You will start to get EACCESS errors when installing some of your modules, if you resorted to manually creating the folder without realizing the underlying cause.

Now... on Linux/Unix systems... it's a completely different issue, as the active user should have access to the parent directories these folders are created in, and in my cases, the error persists even when I compile node and then install npm (node using prefix $HOME/local), and then appending that to my $PATH.

Windows users... run the install as admin, or run the install to a user owned directory. If you are compiling from source then use the --prefix flag and set it to something like:

./configure --prefix=C:\Users\$USER\local

If you still get the same error, and you aren't running as admin, then you'll know you are experiencing the same issue reporting here.

@alundiak
Copy link

@alundiak alundiak commented Aug 14, 2014

I've just installed 10.0.30 v on Windows, and I wanted "npm init" but fail.
So fix of this issue was the following:

npm install -g grunt-cli

So that NodeJS/npm created folder (which is odd, why it couldn't' create during Node.JS)
And then I could run "npm init" or whatever npm command.

PS. my Windows user is standard user, not administrator.

@LucciSMo
Copy link

@LucciSMo LucciSMo commented Aug 14, 2014

Al parecer en el ultimo instalador se les paso poner que creara la carpeta
Luego fui a ver la carpeta:
C:\AppData\Roaming\npm
pero en mi windows no existia la carpeta, luego la cree braviado como los cholos
y ya funcionan todos los comandos de instalacion

@murrah
Copy link

@murrah murrah commented Aug 16, 2014

Win 7 professional. I was logged in as Administrator and still got the problem. From @LongLiveCHIEF I uninstalled node from c:\Program files\nodejs and reinstalled in C:\nodejs. All worked perfectly after that, :-)

@LongLiveCHIEF
Copy link

@LongLiveCHIEF LongLiveCHIEF commented Aug 16, 2014

@murrah that's basically the same as prefixing, but on Windows, creating a directory at the root level like that works differently. In your case, it's not a bad idea (as long as you're ok with cluttering your highest level directory)... just make sure you add the node and npm bin folders to your path. Otherwise when you try to install something like phantomJS or anything else that doesn't run on node, but is called by node... you'll run into problems.

On a sidenote... I love how all these Windows users think they have the same issue, and then subsequently think they have solved the issue, when all along if they would do things the right way in the first place, they'd not even HAVE an issue.

This thread was started by a Mac user (if you don't know how I know that, then you really shouldn't be saying "this is how I fixed it"), and only applies to linux/unix systems for the cause of this instance of the error.

There are a myriad number of reason you'll get an ENOENT error, but all of you Windows people are getting it for a completely different reason.... either installing as a non-admin to protected directories, or installing as an admin and subsequently trying to run installs as a regular user.

@jakblak
Copy link

@jakblak jakblak commented Aug 20, 2014

@jamescrowley solution worked for me also on windows 8
In my case, I hit this after a fresh install of Node on Windows 8. I just went and created the C:\username\AppData\Roaming\npm folder, as it wasn't present

@MathRobin
Copy link

@MathRobin MathRobin commented Aug 20, 2014

Getting the error too.
Versions :
$ node -v
v0.10.31
$ npm -v
1.4.23
I'm on last debian wheezy up-to-date.

Whatever I'm trying to do (with or without sudo) :
$ sudo npm cache clean
Error: ENOENT, open '[...mypath...]/src/libjs/null'
$ sudo npm install grunt-concurrent
Error: ENOENT, open '[...mypath...]/src/libjs/null'
$ sudo npm install grunt-concurrent --save-dev
Error: ENOENT, open '[...mypath...]/src/libjs/null'

Same problem even if i done this before :
rm -rf ~/.npm

@guyfawkes5
Copy link

@guyfawkes5 guyfawkes5 commented Aug 20, 2014

@jamescrowley has it, creating the directory C:\Users{yourUsername}\AppData\npm if it doesn't already exist solves this for Windows 8.

@monya001
Copy link

@monya001 monya001 commented Aug 21, 2014

to solve on Win7 I created "C:\Users{yourUsername}\AppData\Roaming\npm" folder using command line "mkdir C:\Users{yourUsername}\AppData\Roaming\npm"

@LongLiveCHIEF
Copy link

@LongLiveCHIEF LongLiveCHIEF commented Aug 21, 2014

Any of you "I solved on Windows" guys know how to read? This issue has
ceased to become useful. Should probably open a new issue and specify
Linux\Unix in title.
On Aug 21, 2014 5:24 AM, "monya001" notifications@github.com wrote:

to solve on Win7 I created C:\Users{yourUsername}\AppData\Roaming\npm
using command line "mkdir C:\Users{yourUsername}\AppData\Roaming\npm"


Reply to this email directly or view it on GitHub
#3664 (comment).

@ramnathsagar
Copy link

@ramnathsagar ramnathsagar commented Sep 8, 2014

On windows machine, sometimes this might happen, when npm folder is not present under AppData\Roaming. Fix it by creating a dir called npm over here

@antonioribeiro
Copy link

@antonioribeiro antonioribeiro commented Oct 15, 2014

What I have:

Windows 8 on a SSD drive, shared with
Ubuntu Linux 14.04 using cifs (samba) which map a folder on SSD to /var/www/
NodeJS v0.10.32
npm 1.4.28

This Windows desktop is just for text editing (PHPStorm can be very slow on network), everything else is done on Linux, package install (Composer, npm, gulp, etc.) and also the webserver (PHP + NGINX).

But as many others here npm install AND sudo npm install both gives me a bunch of

npm ERR! System Linux 3.13.0-32-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /var/www/app.dev
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path /var/www/app.dev/node_modules/laravel-elixir/node_modules/gulp-less/node_modules/less/node_modules/request/node_modules/node-uuid/.npmignore
npm ERR! code EIO
npm ERR! errno 55
npm ERR! Error: EIO, open '/var/www/app.dev/node_modules/laravel-elixir/node_modules/gulp-less/node_modules/less/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json'
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>

But why is it able to install some of the packages/files?

I tried to

  • Delete the full node_modules folder
  • Delete ./~npm folder
  • Run npm cache clean

The folder is writable, since I have other software like Composer and NGINX being able to write to it, it's just npm which is having trouble and only with some files, because it was able to install half of them, around 60MB of 116MB.

Everything installs fine doing

$ mkdir /tmp/node
$ cp package.json /tmp/node/
$ cd /tmp/node
$ npm install

But while moving that folder to /var/www, I got those errors:

mv: cannot create symbolic link ‘./node_modules/laravel-elixir/node_modules/gulp-phpunit/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi’: Operation not supported

And I understood that some of the problems (not all of them) are not related to file creation, but symbolic links, which aren't being correctly translated. Maybe because:

The default security settings in Windows Vista/Windows 7 disallow non-elevated administrators and all non-administrators from creating symbolic links. This behavior can be changed running "secpol.msc" the Local Security Policy management console (under: Security Settings\Local Policies\User Rights Assignment\Create symbolic links). It can be worked around by starting cmd.exe with Run as administrator option or the runas command.

I disabled that limitation on Windows, but still the links are not being created. So, this might also not be the source of the problem.

@othiym23
Copy link
Contributor

@othiym23 othiym23 commented Oct 16, 2014

@antonioribeiro, see #6438 (comment) – it seems that you've run into the same issue. It's a weird one!

@antonioribeiro
Copy link

@antonioribeiro antonioribeiro commented Oct 16, 2014

Super weird. As you noticed I'm in a Linux command line prompt and I cannot run chcp directly, but I tried to mount it:

sudo mount -t cifs //172.17.0.100/\!Development /var/www -o file_mode=0664,dir_mode=0775,_netdev,gid=33,uid=1000,credentials=/home/antoniocarlos/cifs-credentials.txt,iocharset=<CODEPAGE>

Using some different codepages:

utf8
cp850
cp860
cp1250

And always got the very same error.

Usually those problems are related to character translation from one table to another, but there are no special chars in those files, and I'm able to manually touch the very same file npm is erroring on:

touch /var/www/app.dev/node_modules/laravel-elixir/node_modules/gulp-concat/LICENSE

@othiym23
Copy link
Contributor

@othiym23 othiym23 commented Oct 16, 2014

@antonioribeiro If you want to continue this discussion, you should probably open a new issue, because there are 50 participants on this issue, the original bug is unrelated to what you're seeing, and thus we're spamming a whole bunch of people with something unrelated to them. That said, all it needs is one character that is out-of-codepage to cause EIO, which is otherwise a very rare error in Node.

@rrozanka
Copy link

@rrozanka rrozanka commented Nov 3, 2014

Just got the same issue on Ubuntu 14.04. I fixed it by installing this package:

sudo apt-get install nodejs-legacy

@arviman
Copy link

@arviman arviman commented Nov 10, 2014

Had this issue on Win 7 x64. It appeared that installing node did not create the C:\users\appdata\roaming\npm and c:\users\appdata\roaming\npm-cache folder. Creating them manually fixed it.

@ghost
Copy link

@ghost ghost commented Nov 25, 2014

still error on Ubuntu 14 ..

gyp ERR! System Linux 3.16.0-24-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/coin/node-bignum
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok

npm ERR! bignum@0.9.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bignum@0.9.0 install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/coin/node-bignum
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

thanks rrozanka , this helps:
apt-get install nodejs-legacy

@KenanY
Copy link
Collaborator

@KenanY KenanY commented Nov 25, 2014

@buechling Your issue is unrelated to the thread you've commented on. Regardless, your issue is not the fault of npm but the consequence of the Debian developers' decision to rename the Node.js binary from node to nodejs. Some modules on npm expect the binary to be called node. The nodejs-legacy apt package symlinks a node binary to nodejs.

@npm npm locked and limited conversation to collaborators Nov 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests