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

fix: convert defineNuxtRouteMiddleware to legacy middleware #814

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

wattanx
Copy link
Collaborator

@wattanx wattanx commented Jun 18, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Fixed defineNuxtRouteMiddleware as it needs to be converted to legacy middleware and executed.
Also, abortNavigation has been updated with reference to Nuxt 3.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@wattanx wattanx requested a review from danielroe June 18, 2023 13:34
@danielroe
Copy link
Member

Thank you! πŸ‘Œ

@danielroe danielroe changed the title fix: fix defineNuxtRouteMiddleware to be converted to legacy middleware and upstream abortNavigation fix: convert defineNuxtRouteMiddleware to legacy middleware Jun 20, 2023
@danielroe danielroe merged commit ad4135b into nuxt:main Jun 20, 2023
@danielroe danielroe mentioned this pull request Jun 20, 2023
@Towerism
Copy link

Towerism commented Jun 21, 2023

FYI now that this has been released to npm, we cannot use the latest nuxt bridge-edge. Trying to start our application results in a blank page. And an error in the console that states:

composables.mjs:126 Uncaught (in promise) TypeError: Cannot set properties of undefined (setting '_processingMiddleware')
    at _callee$ (composables.mjs:126:40)
    at tryCatch (runtime.js:64:15)
    at Generator.invoke (runtime.js:299:1)
    at Generator.eval [as next] (runtime.js:124:1)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:25:1)
    at eval (asyncToGenerator.js:32:1)
    at new Promise (<anonymous>)
    at eval (asyncToGenerator.js:21:1)
    at eval (composables.mjs:136:4)

image

For now, we have no choice but to use an older version 3.0.0-28109745.a6e6787 which is the last release that doesn't contain this change.

@wattanx
Copy link
Collaborator Author

wattanx commented Jun 22, 2023

@Towerism
If possible, could you provide a reproduction?
It will help us to resolve that error quickly.
(It would be helpful if you could also create an issue.)

@Towerism
Copy link

@wattanx created issue. includes reproduction. #826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants