[GODRIVER-299] Adding MongoDB GO driver dependency using Dep results in an error Created: 24/Mar/18  Updated: 28/Oct/23  Resolved: 29/Mar/18

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ayache Khettar Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Running `dep` command I get the error below.

dep ensure -add github.com/mongodb/mongo-go-driver

Fetching sources...

Solving failure: No versions of github.com/mongodb/mongo-go-driver met constraints:
        v0.0.2: Could not introduce github.com/mongodb/mongo-go-driver@v0.0.2, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        v0.0.1: Could not introduce github.com/mongodb/mongo-go-driver@v0.0.1, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        master: Could not introduce github.com/mongodb/mongo-go-driver@master, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        71: Could not introduce github.com/mongodb/mongo-go-driver@71, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        GODRIVER-101: Could not introduce github.com/mongodb/mongo-go-driver@GODRIVER-101, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        GODRIVER-33: Could not introduce github.com/mongodb/mongo-go-driver@GODRIVER-33, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        command-wireprotocol-redesign: Could not introduce github.com/mongodb/mongo-go-driver@command-wireprotocol-redesign, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
        meta/config: Could not introduce github.com/mongodb/mongo-go-driver@meta/config, as its subpackage github.com/mongodb/mongo-go-driver does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)



 Comments   
Comment by Ayache Khettar [ 26/Mar/18 ]

Thanks Kris for your prompt response. it worked now with the above command.

Comment by Kristofer Brandow (Inactive) [ 24/Mar/18 ]

Hi Ayache,

For dep ensure to work it requires a go package, so if you change your command to dep ensure -add github.com/mongodb/mongo-go-driver/mongo, it should work. Please try this out and let us know if this fixes your issue.

Generated at Thu Feb 08 08:33:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.