histoire-dev / histoire-dev/histoire
Nuxt UI <ULink> generates an error
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
When using `` (link component from Nuxt UI) the following error occurs:
`Uncaught (in promise) TypeError: (destructured parameter) is undefined`
Documentation for ULink:
https://ui.nuxt.com/components/link
The reproduction link is a Nuxt project with Nuxt UI and Histoire configured.
A story was created with 3 variants : one with ``, one with ``, and one with `` that is not rendered because of the error you can see in the inspector.
Just run `npm run story:dev` to see this story.
### Reproduction
https://stackblitz.com/edit/nuxt-ui-erhpts?file=components%2FLink.story.vue
### System Info
```shell
System:
OS: macOS 12.7.3
Memory: 591.05 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
npm: 10.4.0 - ~/.nvm/versions/node/v20.11.1/bin/npm
pnpm: 8.15.3 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
Browsers:
Brave Browser: 122.1.63.174
Chrome: 123.0.6312.58
Safari: 17.4
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
npm
### 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 by running `npm run story:dev` in the provided StackBlitz reproduction and inspect `components/Link.story.vue`. Compare the working anchor and NuxtLink variants with the ULink variant, then trace the error in the Nuxt UI and Histoire integration. Done means the ULink story renders without the reported undefined-parameter error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- devtools, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100