-
Notifications
You must be signed in to change notification settings - Fork 935
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
"Cannot find module 'zod'" in production environment #1072
Comments
@oakgary what happens if you import zod in your own code? does that work? |
@RobertCraigie the project, including openai and zod, works entirely fine locally, so I guess yes. |
That's strange, could you share your |
I can't really share the whole |
No worries, would you mind redacting any parts you feel are sensitive and then sharing it? I'm not really sure what I'd need to be able to reproduce, so it would be helpful to get as similar of a setup as possible. |
There isn't really much left after
For context though, we only added During our deployment the relevant GitHub Actions steps should be
When it's deployed it's running inside a |
While working on a minimal reproducible repository and debugging, the process involved two steps:
I then noticed that our build system, Nx, removed the |
Is |
I've updated my response above, and the issue is now resolved on our end. Please feel free to close this if there are no further takeaways for the project. |
Thanks for the update!
Yes, we don't want to add it as a required dependency so that users that aren't using the structured output helpers don't need it.
I'm curious how did you define it incorrectly? In case anyone else runs into this in the future. |
colinhacks/zod#3739 -- please include your solutions when you solve something so others like me don't have to wonder |
We are using a monorepo setup with |
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
package.json
:npm ls zod
logsTo Reproduce
I am not sure to be honest. It works fine locally but seems to break somewhere during the deployment. Please let me know what insights could further help you debug this issue.
Code snippets
No response
OS
linux/arm64
Node version
v18.20.4
Library version
v4.60.1
The text was updated successfully, but these errors were encountered: