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

Error installing github repository: "ERR! EISDIR" #7232

Closed
neagle opened this issue Jan 28, 2015 · 21 comments
Closed

Error installing github repository: "ERR! EISDIR" #7232

neagle opened this issue Jan 28, 2015 · 21 comments

Comments

@neagle
Copy link

neagle commented Jan 28, 2015

I'm having trouble installing a github repository with npm. I had this previously working on a different branch of the remote repo, so there's probably something in the repository itself that's causing the problem, but I'm having trouble finding any insight into what it might be. Is there anyone who might be able to help me out?

% node --version && npm --version                                                                                                                                                        
v0.10.34
2.1.14
% npm install neagle/wgo.js --stack                                                                                                                                                       
npm ERR! addLocal Could not install /var/folders/92/lynq92p15853znjggsv4ngrr0000gp/T/npm-25368-dbcaa8b0/1422471933433-0.4677429215516895/80ceaabfbe082937822ec584c89c8786f7db70d7
npm ERR! addLocal Could not install /var/folders/92/lynq92p15853znjggsv4ngrr0000gp/T/npm-25368-dbcaa8b0/1422471934230-0.3644312955439091/80ceaabfbe082937822ec584c89c8786f7db70d7
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "neagle/wgo.js" "--stack"
npm ERR! node v0.10.34
npm ERR! npm  v2.1.14
npm ERR! code EISDIR
npm ERR! errno 28
@smikes
Copy link
Contributor

smikes commented Jan 28, 2015

There might be an ambiguity between the user/project way of specifying github repositories and the path/path way of specifying local directories -- both can be used to set a dependency.

Try using the long form if you want to install from the github repo:

npm install git+ssh://github.com/neagle/wgo.js

Please let me know if I am misunderstanding your question.

@neagle
Copy link
Author

neagle commented Jan 28, 2015

I'm afraid I get the same error if I try to install the repo using a git url.

@smikes
Copy link
Contributor

smikes commented Jan 28, 2015

/cc @othiym23 git dependency problems

Can you try updating to npm@next ? That'll give you 2.4.1, which has some fixes around git dependencies (though I don't know exactly which ones -- see https://github.com/npm/npm/blob/master/CHANGELOG.md for details)

npm install -g npm@next

@neagle
Copy link
Author

neagle commented Jan 28, 2015

I just updated npm and still get the same output:

npm ERR! addLocal Could not install /var/folders/92/lynq92p15853znjggsv4ngrr0000gp/T/npm-37034-6d6dc529/git-cache-98efcda9367c/80ceaabfbe082937822ec584c89c8786f7db70d7
npm ERR! addLocal Could not install /var/folders/92/lynq92p15853znjggsv4ngrr0000gp/T/npm-37034-6d6dc529/git-cache-bacb06fc108e/80ceaabfbe082937822ec584c89c8786f7db70d7
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "neagle/wgo.js"
npm ERR! node v0.10.34
npm ERR! npm  v2.4.1
npm ERR! code EISDIR
npm ERR! errno 28

Huh! I wonder what insane thing I did to that repo to make it so uncooperative?

Do you (or anyone) have any insight into the addLocal errors? Is there a potential permissions issue?

@kenany
Copy link
Contributor

kenany commented Jan 28, 2015

@neagle Your issue is that you are trying to npm install a repo that does not contain a package.json. As far as npm knows, you are trying to install something that is not, by definition, a "package". As such, an EISDIR error is thrown because npm believes you are trying to install a directory rather than a package.

@neagle
Copy link
Author

neagle commented Jan 28, 2015

Ah, if that's the case I misunderstood the capacity of adding a github repo
as a dependency. Thank you!

Nate Eagle

On Jan 28, 2015, at 5:00 PM, Kenan Yildirim notifications@github.com
wrote:

@neagle https://github.com/neagle Your issue is that you are trying to npm
install a repo that does not contain a package.json. As far as npm knows,
you are trying to install something that is not, by definition, a
"package". As such, an EISDIR error is thrown because npm believes you are
trying to install a directory rather than a package.


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

@neagle neagle closed this as completed Jan 28, 2015
@smikes
Copy link
Contributor

smikes commented Jan 29, 2015

@kenany Thanks for seeing that! Next time I will remember to look at the repository in question. 🤦

@neagle
Copy link
Author

neagle commented Jan 29, 2015

Sorry to take your time, Sam!

Nate Eagle

On Jan 29, 2015, at 12:20 AM, Sam Mikes notifications@github.com wrote:

@kenany https://github.com/KenanY Thanks for seeing that! Next time I
will remember to look at the repository in question. 🤦


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

@Strajk
Copy link

Strajk commented Feb 3, 2015

Same happened to me... I haven't realized I cannot point to just any Github repo

@gonzofish
Copy link

This thread was extremely helpful, thanks for the clear-cut answer!

@recursify
Copy link

@kenany - can the error message be updated to be more helpful?
In my case I was trying to npm install from a git repository where the package.json was accidentally omitted. npm ERR! code EISDIR is a pretty obscure error message to track down!

@kenany
Copy link
Contributor

kenany commented Aug 1, 2015

@recursify npm --version? I believe it has since been improved to this, but the latest comments on that thread seem to say otherwise.

@recursify
Copy link

@kenany - I'm on 2.10.1

@ghost
Copy link

ghost commented Aug 14, 2015

Got the same error on 2.12.0 and ended up here. Answer here solved my issue but I agree with @recursify about a more helpful message. cc @kenany

@markstos
Copy link

I got EISDIR on npm 3.3.0. The issue was that the Git site didn't have a package.json, but that was not at all clear from EISDIR. An updated error message would be helpful.

@jiv-e
Copy link

jiv-e commented Sep 7, 2015

This thread was really helpful! Would it be possible to describe the possible problem in the error message?

@kenany
Copy link
Contributor

kenany commented Sep 7, 2015

@jiv-e Done! #9396

@vviikk
Copy link

vviikk commented Dec 28, 2015

@kenany: npm's error messages are notoriously bad. A simple 'We could not find a package.json at the GIT Repository' would have save me some time

@kenany
Copy link
Contributor

kenany commented Dec 28, 2015

@piggyslasher Like #9396?

@j03m
Copy link

j03m commented May 1, 2017

I'm fairly certain you used to be able to do this at some point, it was wildly useful.

@alexgorbatchev
Copy link
Contributor

Took me a while to figure out what EISDIR meant. This could be improved.

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