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 }}
v7.112 webpack & angular warning: node_modules/@sentry/integrations/esm/offline.js depends on 'localforage'. CommonJS or AMD dependencies can cause optimization bailouts. #11817
This is Angular app, using Angular 16. (And using @sentry/browser)
Update Sentry from v7.111 to v.112
ng build
Expected Result
Not to log any warnings
If I want earlier functionality, do I need to set integrations: [] in init? This was not covered in the release notes.
Actual Result
Warning printed
Warning: <project>/node_modules/@sentry/integrations/esm/offline.js depends on 'localforage'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Well nvm we don't vendor offline at all, but I guess webpack complains about it. I think we have to alias the localforage import with a dynamic require, or vendor in localforage to get around this problem.
We've released v8.0.0 which dropped the offline integration overall - so updating to this should get rid of this warning!
I'll close this issue, if you still run into this on the latest version of the SDK, please re-open the issue - thank you!
If you have build problems related to this, we recommend to update to v8 where this is gone. On v7, this is hard for us to fix because some things depend on localforage, but it does not play well with some setups, sadly.
Activity
AbhiPrasad commentedon Apr 26, 2024
To clarify this is just a warning right? It does not cause the build to fail?
I think we should not vendor the
offlineintegration like we do with the rest because of this problem. Opening a PR!AbhiPrasad commentedon Apr 26, 2024
Well nvm we don't vendor
offlineat all, but I guess webpack complains about it. I think we have to alias thelocalforageimport with a dynamic require, or vendor inlocalforageto get around this problem.@mydea could you take a look on Monday?
rubiesonthesky commentedon Apr 26, 2024
Yeah luckily it's just warning, so it does not block building the application. :)
I can see that in package.json, packages
immediate,lieandlocalforageare now added when they weren't present earlier.These are the only Sentry packages that we have installed
AbhiPrasad commentedon Apr 26, 2024
There's another solution here we can do which sucks, but is better than nothing to unblock us.
@sentry-internal/integrationspackage, and put all of the integrations other than offline into that package.@sentry/integrationsdepend on@sentry-internal/integrations, and then have it useofflineintegration@sentry-internal/integrationsSorry for the trouble @rubiesonthesky - appreciate your patience while we get a fix out!
mydea commentedon May 15, 2024
We've released v8.0.0 which dropped the offline integration overall - so updating to this should get rid of this warning!
I'll close this issue, if you still run into this on the latest version of the SDK, please re-open the issue - thank you!
ollieyeahlong commentedon Jun 27, 2024
Hi, updating @sentry/angular-ivy to version 7.114.0 is giving me this error. Is this something you are aware of?
mydea commentedon Jun 27, 2024
If you have build problems related to this, we recommend to update to v8 where this is gone. On v7, this is hard for us to fix because some things depend on localforage, but it does not play well with some setups, sadly.