histoire-dev / histoire-dev/histoire

use of histoire in nuxt3 returns vite "could not resolve" errors

Open
#300 24 comments 4 reactions 0 assignees View on GitHub
bug nuxt
Dominant language
TypeScript
Stars
3.6k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

after setting up histoire in nuxt3 and running `histoire dev`, vite returns a couple of `could not resolve` errors

it also happens on the [nuxt3 StackBlitz demo](https://stackblitz.com/edit/histoire-nuxt3-starter) on the histoire docs

### Reproduction

https://stackblitz.com/edit/histoire-nuxt3-starter

### System Info

```shell
System:
OS: macOS 12.5.1
CPU: (4) x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
Memory: 1.64 GB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 105.0.5195.125
Firefox: 103.0.2
Safari: 15.6.1
npmPackages:
@histoire/plugin-nuxt: ^0.10.7 => 0.10.7
@histoire/plugin-vue: ^0.10.7 => 0.10.7
histoire: ^0.10.7 => 0.10.7
vite: ^3.0.9 => 3.1.3
```

### Used Package Manager

yarn

### 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

Open the contributing guide

Research direction

Start with the linked Nuxt3 StackBlitz reproduction and run `yarn histoire dev` to capture the Vite resolution errors. Review the Nuxt3 starter configuration and the @histoire/plugin-nuxt integration, then verify that the demo starts without unresolved-module errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript, vite
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.