-
Hi! I have the following workflow, but for some reason I cant access my First I define my Album object in
I then define the model in
I save, and now my CLI prompts me to run the two Now, I head back over to
The only way I've gotten around this is to just close out of VS Code completely and then reopen. When I do that, What am I missing in my workflow to get this strongly typed typescript support after i run the migration? Thanks! Edit: here are my dependencies:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Mine works just fine, trying running the prisma generate command and see if that will fix it 😊 $ npx prisma generate Sometimes VSCode fails to update the current types on time |
Beta Was this translation helpful? Give feedback.
-
Erf. That's unfortunately a VS Code problem. We've worked hard to prevent that from happening but it looks like there are still cases where this happens. The TLDR is that, as we regenerate the typings, VS Code doesn't always pick up these changes and so the types end up not being refreshed and you don't see these new typings. Most of the time, when that happens, you have two options:
While this is not ideal at all, we're still actively looking to understand why VS Code is properly picking these changes for some people and why it's not for others. If you're interested in helping us solve this problem, we'd love to know more about your OS and even maybe a small reproduction on your side. Feel free to create a proper issue to discuss that so that other people can chime in if they ever encounter that same problem. Marking it as answered for now 🙌 |
Beta Was this translation helpful? Give feedback.
Erf. That's unfortunately a VS Code problem. We've worked hard to prevent that from happening but it looks like there are still cases where this happens.
The TLDR is that, as we regenerate the typings, VS Code doesn't always pick up these changes and so the types end up not being refreshed and you don't see these new typings. Most of the time, when that happens, you have two options:
Restarting the TS Server
CMD + CTRL clicking on either the Prisma Client or a Nexus method so that it brings you to the typings, which should make VS Code refresh those typings. Just like you ended up doing.
While this is not ideal at all, we're still actively looking to understand why VS Code is prope…