1

I get this error, while I import gorm package into my project. I am using Goland on Ubuntu 22.

Build constraints exclude all the Go files in '/home/masoud/go/src/gorm.io/gorm'

2 Answers2

0

It seems that the issue for me was as simple as using

go clean -modcache

and then following that with

go mod tidy

  • Thanks It did not work for me in this case, any other ideas? – Masoud Hosseini Oct 28 '22 at 22:23
  • @MasoudHosseini Not too sure honestly. try what they say in this post maybe. https://intellij-support.jetbrains.com/hc/en-us/community/posts/4407257418514-Build-constraints-exclude-all-the-Go-files-in- – Nicholas Davis Oct 30 '22 at 03:00
0

It fixed! I deleted project and its directory, and I cloned it again from git. after that I ran: go mod tidy and boom, I can develop smoothly.