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

examples(with-sockets): fix cannot read property 'app' of undefined on nuxt build #6586

Merged
merged 1 commit into from Oct 18, 2019
Merged

examples(with-sockets): fix cannot read property 'app' of undefined on nuxt build #6586

merged 1 commit into from Oct 18, 2019

Conversation

reskume
Copy link

@reskume reskume commented Oct 17, 2019

The provided example works flawlessly in dev mode but when "nuxt build" is run, the build will fail with an error "Cannot read property 'app' of undefined" since the renderer is not available yet. By using the 'render:before' hook to assure that the renderer is available, it works as expected. This may not be the best solution but worked for me.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

The provided example works flawlessly in dev mode but when "nuxt build" is run, the build will fail with an error "Cannot read property 'app' of undefined" since the renderer is not available yet. By using the 'render:before' hook to assure that the renderer is available, it works as expected. This may not be the best solution but worked for me.
@manniL manniL requested a review from pi0 October 17, 2019 19:48
@pi0 pi0 changed the title Fixes "Cannot read property 'app' of undefined" on "nuxt build" examples(with-sockets): fix cannot read property 'app' of undefined on nuxt build Oct 18, 2019
@pi0 pi0 merged commit b8e1a71 into nuxt:dev Oct 18, 2019
@pi0
Copy link
Member

pi0 commented Oct 18, 2019

Thanks!

@pi0 pi0 mentioned this pull request Oct 21, 2019
@pi0 pi0 mentioned this pull request Dec 17, 2019
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants