This repository demonstrates an error that occurs when using Sentry with Vercel AI SDK in ESM
Original reproduction available at: https://github.com/Jaakkonen/sentry-spotlight-vercel-ai-bug
When running a Node.js application that registers the import-in-the-middle
hook and adds Sentry's SentryVercelAiInstrumentation
, the following error occurs:
TypeError: setters.get(...)[name] is not a function
at Object.set (/node_modules/.pnpm/import-in-the-middle@1.13.1/node_modules/import-in-the-middle/lib/register.js:13:37)
It appears like IITM is trying to set the default
export which isn't defined in the ai
package.
pnpm install
- Run the application with:
$ node index.js