-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
[nuxt] usage with Histoire #210
Comments
the provided repo gives me an error on install 🤔
|
The error you're receiving is likely related to the version of pnpm or node.js. Please follow the steps below for reproduction => https://stackblitz.com/edit/nuxt-starter-27hxyy |
Ok, I have it working but have several concerns:
I'm also curious if it'd happen as well if we were to use |
1 .Because I have a very large application and I want to avoid the emit hell by passing props through multiple levels.
|
My question was more "is there another plugin that can cause this" and i think there may be. For some reason, the config options just dont get passed 🤔 |
No. See (https://stackblitz.com/edit/nuxt-starter-27hxyy), I only use Nuxt, Pinia, and Historie - in this setup, I don't have any errors - I add a plugin and I get errors. |
Hi, as a temporary workaround, you can disable the plugin for when the project is run by histoire with this export default defineNuxtConfig({
modules: [
// ... other modules
process.env.HISTOIRE ? undefined : "@pinia-plugin-persistedstate/nuxt",
],
}) |
@prazdevs in my case, your proposal of a temporary workaround doesn't work. I have a
|
Describe the bug
Hi, I'm using a plugin for Nuxt and I'm having trouble integrating it with Histoire (https://github.com/histoire-dev/histoire).
Reproduction steps:
Run
pnpm story:dev
Error:
[nuxt] error caught during app initialization TypeError: Cannot destructure property 'cookieOptions' of '__vite_ssr_import_2__.useRuntimeConfig(...).public.persistedState' as it is undefined. at Object.setup (/nuxt-app/node_modules/.pnpm/@pinia-plugin-persistedstate+nuxt@1.1.1_@pinia+nuxt@0.4.11_pinia@2.1.3/node_modules/@pinia-plugin-persistedstate/nuxt/dist/runtime/plugin.mjs:8:11) at wrapper (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:191:21) at /nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:111:58 at fn (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:208:44) at Object.runWithContext (/nuxt-app/node_modules/.pnpm/@vue+runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:3855:18) at callWithNuxt (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:213:24) at Object.runWithContext (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:32:29) at applyPlugin (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:111:37) at Module.applyPlugins (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/nuxt.js:123:21) at async initApp (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/entry.js:53:7) [nuxt] error caught during app initialization ReferenceError: document is not defined at normalizeContainer (/nuxt-app/node_modules/.pnpm/@vue+runtime-dom@3.3.4/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:1440:17) at app.mount (/nuxt-app/node_modules/.pnpm/@vue+runtime-dom@3.3.4/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:1371:23) at initApp (/nuxt-app/node_modules/.pnpm/nuxt@3.5.2_@types+node@18.0.0_sass@1.62.1/node_modules/nuxt/dist/app/entry.js:61:14)
When I don't use the @pinia-plugin-persistedstate/nuxt plugin, the error doesn't occur.
Reproduction
https://github.com/zarskilukasz/nuxt-minimal
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: