-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Error: [nuxt] instance unavailable / Context conflict #661
Comments
When running the examples using The problem is that the module sets I naively fixed this by adding the following in the
After
|
<!--- ☝️ PR title should follow conventional commits (https://conventionalcommits.org) --> ### 🔗 Linked issue <!-- If it resolves an open issue, please link the issue here. For example "Resolves #123" --> Related #661 ### ❓ Type of change <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [ ] 📖 Documentation (updates to the documentation or readme) - [x] 🐞 Bug fix (a non-breaking change that fixes an issue) - [ ] 👌 Enhancement (improving an existing functionality) - [ ] ✨ New feature (a non-breaking change that adds functionality) - [ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries) - [ ]⚠️ Breaking change (fix or feature that would cause existing functionality to change) ### 📚 Description <!-- Describe your changes in detail --> <!-- Why is this change required? What problem does it solve? --> This PR updates the global nuxt context, setting its `nuxt` property to the story's nuxt when setting up the current story. Previously, when navigating from one story to another story, Nuxt would get the context using the app's `_name`, which is the same for all stories, instead of using the `globalName`, which is different for each story. Co-authored-by: Tobias Diez <code@tobiasdiez.de>
I think this issue is still there. I have create a reproduction. The context conflict only occurs if you create multiple stories. Reproduction: If you got to the "SingleStory" docs everything is working fine. You you got to the "MultiStory" docs you can see the context issue. |
@tobiasdiez , You closed the issue I opened but the problem still persists. |
@ademyalcin27 can you please create a reproduction? I checked it with the nigthly build and everything is working |
Yes I did here, #768 |
In your reproduction you use the version 8.2.0. The issue is currently only available with the nightly build. I think the team will include the fix in the next release ;) to test the fix use the nightly build as dependency.
|
I tried this version but still doesn't work autodoc |
You need minimum "nuxt": "3.13.0". |
Yes its Im using 3.13.0 , but still Im getting same eror |
Could you please share an updated reproduction? |
https://stackblitz.com/edit/nuxt-starter-ga2at1?file=package.json |
is not needed and pulls in the older version without the fix |
Thank you this solve my problem. |
With #619, composable and other things using the nuxt instance are generally working. However, sometimes when switching between stories one still gets a
[nuxt] instance unavailable
error.Todo: find a way to reproduce this reliably and investigate what's the problem
Workaround: refresh the page
The text was updated successfully, but these errors were encountered: