Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dub won't recognize dub.json #535

Closed
aBothe opened this issue Mar 27, 2015 · 6 comments
Closed

Dub won't recognize dub.json #535

aBothe opened this issue Mar 27, 2015 · 6 comments

Comments

@aBothe
Copy link

aBothe commented Mar 27, 2015

As soon as I execute dub in my directory where my dub.json is located in, dub spits out a weird(ly printed -- immutable(FilenameAndFormat)("dub.json", json) - just emitting "dub.json" isn't enough?) error message:

$ dub
Error executing command run:
no package file was found, expected one of the following: [immutable(FilenameAndFormat)("dub.json", json), immutable(FilenameAndFormat)("package.json", json)]

DUB version 0.9.22+198-g83b2926, built on Feb 17 2015

@Geod24
Copy link
Member

Geod24 commented Apr 11, 2015

Could you put the content of your dub.json ?
I get the same error, with the following:

{
    "name": "rest",
    "dependencies": {
        "userman":  { "path": "../" }
    },
    "versions": [ "VibeDefaultMain" ]
}

It turns out my path dependency was wrong (should have been "../../"), but this error message is not informative at all (btw it prints that weird message because it works with an array of FileAndFormat).

@s-ludwig
Copy link
Member

I've fixed the error message now. Judging by the (DUB) source code, it's very likely that this was caused by the same issue as in @Geod24's example.

@aBothe
Copy link
Author

aBothe commented Apr 12, 2015

Wow indeed, that was the ../../ part which caused dub to fail. Just tested it.

Still, because this might cause some path overlappings or so, dub should recognize and/or handle this path so it'll take the dub.json located in .

@aBothe
Copy link
Author

aBothe commented Apr 12, 2015

Or..hold on, it actually is interpreting ./dub.json already, it just won't find the dependency's dub.json.. didn't think that way around.

@s-ludwig
Copy link
Member

Yes exactly, it was indeed very confusing. It becomes clear now with the new error message, though.

@aBothe
Copy link
Author

aBothe commented Apr 12, 2015

Nice then. Thanks! :)

@aBothe aBothe closed this as completed Apr 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants