getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
8.02k stars 1.59k forks source link

Nuxt build error : ERROR "sentry-release-injection-file" is imported as an external by #14447

Open ghisleouf opened 5 days ago

ghisleouf commented 5 days ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

8.28.0

Framework Version

Nuxt 3.12.3

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

Hi Sentry,

I'm having a build error since an update in my project and I can't find a way to fix it. The project is based on Nuxt3 (v. 3.12.3) and Vite.

When running npm run buildcommand, I'm getting the following error:

ERROR "sentry-release-injection-file" is imported as an external by "@videojs/vhs-utils/cjs/resolve-url.js?commonjs-external", but is already an existing non-external module id.

Actually, the update we did is quite simple in the codebase. We have leveraged to Dynamic component import to load Video player that wraps video.js library.

And now at build time, the previous error is triggered.

Do you have any idea from where the issue could come from ?

Thanks a lot for your help.

Best.

Expected Result

Build works.

Actual Result

Build fails.

Image

andreiborza commented 4 days ago

Hello @ghisleouf, thanks for writing in.

Could you please upgrade to the latest 8.40.0 version of the @sentry/nuxt sdk and see if that fixes the issue?

ghisleouf commented 4 days ago

HI @andreiborza ,

Thanks for your quick answer. I've just updated to 8.40.0 ("@sentry/nuxt": "^8.40.0",) but still the same exact issue.

Thanks again for your precious help.

Best.

andreiborza commented 4 days ago

@ghisleouf could you please provide a minimal reproduction repo or stackblitz where we can try to investigate this?

s1gr1d commented 4 days ago

I just tried to reproduce it by just using the Lazy feature on an internal component and it worked. Would appreciate a reproduction 🙌