Skip to content
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

@sentry/nextjs: Next.js build fails with Webpack 4 + next-offline #4133

Closed
4 of 9 tasks
jasonadkison opened this issue Nov 8, 2021 · 2 comments
Closed
4 of 9 tasks
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug

Comments

@jasonadkison
Copy link

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other: @sentry/nextjs

Version:

6.14.1

Description

Ref: #3613

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

We are not able to upgrade our project to Webpack 5, as was previously recommended.

Here's a link to the repo where the issue can be reproduced: https://github.com/jasonadkison/next-sentry-error/

@giulioambrogi
Copy link

any workaround while this is being looked at?

@onurtemizkan onurtemizkan self-assigned this Jun 8, 2022
@onurtemizkan
Copy link
Collaborator

Hi @jasonadkison,

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.

@onurtemizkan onurtemizkan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug
Projects
None yet
Development

No branches or pull requests

4 participants