You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@sentry/nextjs: Next.js build fails with Webpack 4 + next-offline #4133
Our app uses Next.js v11 and Webpack 4. When building a service worker with workbox via next-offline, withSentryConfig causes our builds to fail with the following error:
You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
I was able to reproduce the error in the project you provided, and deleting and recreating package-lock.json using npm@8.11.0 fixed it for me. Also, removing package-lock.json and using yarn instead worked well both locally and on Vercel.
The issue seems originated from the dependency resolution of source-map package. That specific package-lock.json (lockfile version 1) somehow favours an earlier (buggy) version of it.
Closing the issue, as I can't see a way to action this on the SDK side at the moment. But feel free to reopen if that doesn't work.
Activity
giulioambrogi commentedon Feb 9, 2022
any workaround while this is being looked at?
onurtemizkan commentedon Jun 9, 2022
Hi @jasonadkison,
I was able to reproduce the error in the project you provided, and deleting and recreating
package-lock.jsonusingnpm@8.11.0fixed it for me. Also, removingpackage-lock.jsonand usingyarninstead worked well both locally and on Vercel.The issue seems originated from the dependency resolution of
source-mappackage. That specificpackage-lock.json(lockfile version 1) somehow favours an earlier (buggy) version of it.Closing the issue, as I can't see a way to action this on the SDK side at the moment. But feel free to reopen if that doesn't work.