Skip to main content

Jest unable to run after migrating to JavaScript SDK version 8

Updated over a month ago

Issue

While attempting to migrate to Sentry v8, I've found that jest is unable to run for files that use @sentry/node. I get the following error:

ENOENT: no such file or directory, open 'node:util'

Applies To

  • Users using Jest > v27.1.0and v8 of the Node SDK

Resolution

Jest supports node: prefix when importing Node core modules as of version 27.1.0 as outlined in this Jest PR. You'll want to upgrade Jest to v27.1.0.
​

Did this answer your question?