-
Notifications
You must be signed in to change notification settings - Fork 26
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
Calling methods results undefined ( .\main.go:36:28: undefined: faunadb.CreateCollection ) #90
Comments
Found an odd behaviour, when there is the go.mod modules file, it doesn't work, but works when taken out. |
Also this is my go.mod file: module github.com/Henry-Asante/auth_service go 1.13 require ( |
Was able to work when I used Go dep for my package management |
Get the same issue, undefined: faunadb.CreateCollection My go.mod (snippet) What must i do ? |
You need to change your dependency management to go dep: Tutorial I used The idea that worked for me, was to change my project directory to my $GOPATH, I used during installation. Then from there, I run go get .../dep, and run dep init to initiate a new project. Then you can add modules by running the command
This solved all my dependency issues and a lot of red flags I had when developing outside my $GOPATH, and using GO MOD. Hope this works for you, all the best!! |
@Henry-Asante Yeah thanks a lot. I have found another solution. Now i am working with the good old GOPATH :-) Then i have some others problems: |
@mbraeutig You should move to go dep to stop all this. I was informed by the FauanDB team that using Go mod as dependency management produces some errors. Also after moving to Go dep for dependency management. I now understand how my folder is structure and how everything makes a lot more sense coming from a Node.js background. |
@Henry-Asante Can you please try my repro. Thanks |
@mbraeutig , It worked on my setup |
@Henry-Asante Yeah, thanks a lot :-) with my setup, i have no problems with compile, For example, creatingCollection: So, i must think off to switch to dep. Thanks |
Yes @mbraeutig , try that to stop all the problems which will probably come after fixing this. All the best |
Fixed by #112 |
auth::go run main.go
command-line-arguments
.\main.go:36:28: undefined: faunadb.CreateCollection
.\main.go:45:15: undefined: faunadb.Collection
.\main.go:58:15: undefined: faunadb.Collection
.\main.go:70:4: undefined: faunadb.Collection
.\main.go:87:6: undefined: faunadb.Collection
.\main.go:97:45: undefined: faunadb.RefCollection
.\main.go:97:61: undefined: faunadb.Collection
When I isolate the file, it successfully works without giving me any errors, but when I add it to a project, it results in an error. This is just a small section of the problem. I found mostt others when I was using it resulted in some weird errors.
I have tried my best, but I just can't seem to solve it, please help me.
The text was updated successfully, but these errors were encountered: