Next.js Discord

Discord Forum

Vercel ERR_MODULE_NOT_FOUND openai

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Sun bearOP
Using the npm package openai in an API route in a Nextjs app.
Call works as expected locally, but when I push to a staging branch on Vercel it errors with -
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/frontend/node_modules/openai/_shims/agent-node.mjs' imported from /var/task/frontend/node_modules/openai/core.mjs

Any ideas about how I can fix this?! Tried uninstalling and reinstalling openai...

0 Replies