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: histoire #475

Closed
francisashley opened this issue Oct 17, 2023 · 4 comments
Closed

fix: histoire #475

francisashley opened this issue Oct 17, 2023 · 4 comments
Labels

Comments

@francisashley
Copy link

francisashley commented Oct 17, 2023

🐛 The bug

When @nuxt/devtools is included in nuxt.config.js, like:

export default defineNuxtConfig({
  modules: ["@nuxt/devtools"],
});

Running histoire in dev mode will start nuxt but then crash pretty quickly with:

Screenshot 2023-10-17 at 09 38 05

Removing the devtools module, allows histoire to run fine.

🛠️ To reproduce

https://stackblitz.com/edit/nuxt-starter-qar953

Please run npm install && npm run story:dev in the stackblitz terminal to reproduce.

🌈 Expected behavior

For histoire to run fine when nuxt/devtools has been loaded as a module in nuxt.config.ts.

ℹ️ Additional context

No response

@francisashley francisashley added the bug Something isn't working label Oct 17, 2023
@antfu
Copy link
Member

antfu commented Oct 17, 2023

We temporarily close this due to the lack of enough information.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required

@antfu antfu closed this as completed Oct 17, 2023
@francisashley
Copy link
Author

@antfu fair point. I have created a stackblitz example with a reproduction of the issue. https://stackblitz.com/edit/nuxt-starter-qar953. Please run npm install && npm run story:dev in the terminal to see ReferenceError [Error]: localStorage is not defined will throw in the terminal. This issue disappears when removing modules: ['@nuxt/devtools'] from nuxt.config.ts.

@francisashley
Copy link
Author

francisashley commented Oct 22, 2023

Here is a video of the issue:

Screen.Recording.2023-10-22.at.13.24.09.mov
  1. I show nuxt.config.ts and highlight some unrelated config that was added to address another bug blocking histoire booting, i believe this has already been patched in next version - App Manifests break Histoire nuxt#23826, histoire-dev/histoire@05bcd28.
  2. I let npm install && npm run dev run which boots fine.
  3. I rerun with npm install && npm run story:dev which shows the bug in this ticket.
  4. I show the contents of histoire.config.ts and the test story files.

@francisashley
Copy link
Author

nuxt/nuxt#23863 (comment) explains this is being fixed here histoire-dev/histoire#611.

@antfu antfu closed this as completed Nov 20, 2023
@antfu antfu added upstream and removed bug Something isn't working labels Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants