[GODRIVER-1314] Error cannot load go.mongodb.org/mongo-driver/mongo/bson: module go.mongodb.org/mongo-driver@latest (v1.1.1) found, but does not contain package go.mongodb.org/mongo-driver/mongo/bson Created: 18/Sep/19 Updated: 24/Oct/19 Resolved: 24/Oct/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | 1.1.1, 1.1.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Omer Haim | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Go 1.13 |
||
| Description |
|
Working with the basics to start a project. https://www.mongodb.com/blog/post/mongodb-go-driver-tutorial Go 1.13 using go modules. Once adding the BSON import I get the error: cannot load go.mongodb.org/mongo-driver/mongo/bson: module go.mongodb.org/mongo-driver@latest (v1.1.1) found, but does not contain package go.mongodb.org/mongo-driver/mongo/bson
Tried locking the package to 1.1.0 then run go clean -modcache Still fails
|
| Comments |
| Comment by Rathi Gnanasekaran [ 24/Oct/19 ] |
|
omerha@protonmail.comwe are closing this ticket as we have not heard from you in over two week. Feel free to re-open this ticket if this is still an issue. |
| Comment by Divjot Arora (Inactive) [ 07/Oct/19 ] |
|
Hi omerha@protonmail.com, thank you for your report. I was not able to reproduce this issue on a clean machine without the Go driver pre-installed. One thing that sticks out in the error message is "does not contain package go.mongodb.org/mongo-driver/mongo/bson". The bson package is a top-level package in mongo-driver and is not nested in mongo. Can you confirm that you are importing go.mongodb.org/mongo-driver/bson and not go.mongodb.org/mongo-driver/mongo/bson? |