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

Bug: Doesn't work with @nuxtjs/i18n #657

Closed
6 tasks done
filiphazardous opened this issue Jan 9, 2024 · 0 comments
Closed
6 tasks done

Bug: Doesn't work with @nuxtjs/i18n #657

filiphazardous opened this issue Jan 9, 2024 · 0 comments
Labels
to triage This issue needs to be triaged

Comments

@filiphazardous
Copy link
Contributor

Describe the bug

When histoire starts up, it throws an error about nuxt.runWithContext not being a function. This function is used by @nuxtjs/i18n.
However, it is not provided by Histoire's stub: https://github.com/histoire-dev/histoire/blob/main/packages/histoire-plugin-nuxt/runtime/composables.mjs#L1
It gets called here: https://github.com/nuxt-modules/i18n/blob/main/src/runtime/plugins/i18n.ts#L75
...and used here: https://github.com/nuxt-modules/i18n/blob/main/src/runtime/messages.ts#L22

Proposed solution: https://github.com/filiphazardous/histoire/blob/main/packages/histoire-plugin-nuxt/runtime/composables.mjs#L1

Reproduction

Honestly, I couldn't get StackBlitz to work. :-(
I can push a simple reproduction repo, but OTOH I have a PR that solves the problem in one line.

System Info

System:
    OS: Linux 6.6 Pop!_OS 22.04 LTS
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 8.43 GB / 39.09 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
    pnpm: 8.10.0 - ~/.nvm/versions/node/v18.17.1/bin/pnpm
  Browsers:
    Chrome: 120.0.6099.199
  npmPackages:
    @histoire/plugin-nuxt: 0.17.7 => 0.17.7 
    @histoire/plugin-vue: 0.17.6 => 0.17.6 
    @vitejs/plugin-vue: 5.0.2 => 5.0.2 
    histoire: ^0.17.6 => 0.17.6 
    vite: 5.0.11 => 5.0.11

Used Package Manager

pnpm

Validations

@filiphazardous filiphazardous added the to triage This issue needs to be triaged label Jan 9, 2024
@filiphazardous filiphazardous mentioned this issue Jan 9, 2024
10 tasks
@Akryum Akryum closed this as completed in c101356 Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant