ent: internal error: package "context" without types was imported from "entgo.io/ent"
I don’t figure out yet but latest package does not work on my environment.
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
ent generate ent
output
internal error: package "context" without types was imported from "entgo.io/ent"
Expected Behavior 🤔
finish with successfully
Steps to Reproduce 🕹
Steps:
- just do
ent generate ent
Your Environment 🌎
Tech | Version |
---|---|
Go | go version devel go1.18-17980dff36 Wed Nov 10 05:08:25 2021 +0000 windows/amd64 |
Ent | latest commit |
Database | SQLite3 |
Driver | https://github.com/mattn/go-sqlite3 |
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (15 by maintainers)
Issue resolved on master. Please, see attached screenshot
Closing, but feel free to reopen if you still have issues.
Hello @xmlking, can you try the latest version of
entgo.io/contrib
? I think it fixed via https://github.com/ent/contrib/pull/276This seems to be related on Go’s version. I’m trying this on Go 1.18 (tip).
This issue is still occuring with go version
1.20
. Reverting to go version1.19
fixes the issue.it works. thanks
Sorry, I could reproduce this on
bug
repository.Ah, now I figure out what is wrong.
I used entgen and it generate Uesrs from users table (not User). This is my problme. Sorry.