delayedCalls is undefined when using lazy: true
See original GitHub issueVersion
@nuxtjs/sentry: 5.1.3 nuxt: 2.15.8
Sentry configuration
sentry: {
disabled: process.env.APP_ERROR_REPORTING_ENABLED === 'false',
lazy: true,
publishRelease: false,
config: {
environment: process.env.VUE_APP_ENVIRONMENT || 'production',
release: appVersion
}
},
Steps to reproduce
Enable lazy mode
What is Expected?
No errors
What is actually happening?
Occasionally I get this error:
Ignore the LogRocket mentions, it’s just capturing it.
I traced it back to this line: https://github.com/nuxt-community/sentry-module/blob/master/lib/plugin.lazy.js#L48
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Uncaught undefined error when using React.lazy
After looking at my own question, I figured it out looking at the dependencies. My react and react-dom were on different major versions....
Read more >Values are not populated after Formatter.js Added
... Custom SAPUI5 application. in my app i need to display currency value with USD format. ... r = true; ... lazyRounding !==...
Read more >Docs | GSAP | gsap.to()
To disable lazy rendering for a particular tween, set lazy: false . In most cases, there's no need to set lazy . To...
Read more >Lazy Loading in Entity Framework
LazyLoadingEnabled should be true. Navigation property should be defined as public, virtual. Context will NOT do lazy loading if the property is not...
Read more >React check if element is visible on screen
This is especially true if you're using more than one kind of element. ... you commonly come across requests such as lazy loading...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t actually reproduce locally but looking at your minified code:
this is indeed the reason. It’s quite aggressively minified compared to mine:
You can see that in my case the
app.$sentry
is not cached into a local variable so everything works. In your case the minified code does something likevar r = app.$sentry
earlier so it holds to mocked$sentry
reference and uses it even afterapp.$sentry
was updated.Have you modified any of the babel or terser settings in your nuxt config?
Same thing happens for me when using nuxt/composition-api. The solution was to use instance of
$sentry
incontext.app
notcontext
directly, as that one seem to retain the mocked sentry plugin.