histoire-dev / histoire-dev/histoire
Nuxt3 + Vuetify nuxt module : Could not find defaults instance
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
I cannot use histoire with nuxt and vuetify-nuxt-module, i have this error : [Vuetify] Could not find defaults instance
Locally i also have an 500 error : 500 useNuxtApp(...).hook is not a function, but I can't reproduce it on stackblitz.
I use pnpm run story:dev to start the project. Is likely an issue with vuetify...
### Reproduction
https://stackblitz.com/edit/nuxt-starter-ggyx9e?file=nuxt.config.ts,histoire.config.ts,package.json,components%2FformValidation.story.vue
### System Info
```shell
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.3 - /usr/local/bin/pnpm
npmPackages:
@histoire/plugin-nuxt: ^0.17.14 => 0.17.14
@histoire/plugin-vue: ^0.17.14 => 0.17.14
histoire: ^0.17.14 => 0.17.14
```
### Used Package Manager
pnpm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/histoire-dev/histoire/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/histoire-dev/histoire/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://histoire.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/histoire-dev/histoire/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/histoire-dev/histoire/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and inspect nuxt.config.ts, histoire.config.ts, package.json, and components/formValidation.story.vue. Run pnpm run story:dev and compare the Vuetify defaults-instance error with the local useNuxtApp(...).hook failure; done means the Nuxt and Vuetify module setup works without either error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100