histoire-dev / histoire

⚡ Fast and beautiful interactive component playgrounds, powered by Vite
https://histoire.dev
MIT License
3.21k stars 192 forks source link

Error: Cannot find module './shared/untyped.a47b2336.cjs' #665

Open sagalbot opened 10 months ago

sagalbot commented 10 months ago

Describe the bug

The basic example of nuxt3/histoire fails to run. The file untyped.a47b2336.cjs does not exist in node_modules.

This bug doesn't occur with nuxt 3.8, but is present with 3.9.

/Users/sagalbot/.config/yarn/global/node_modules/.bin/pnpm run story:dev

> histoire-example-nuxt3@0.0.1 story:dev /Users/sagalbot/Sites/histoire
> histoire dev

node:internal/modules/cjs/loader:995
  const err = new Error(message);
              ^

Error: Cannot find module './shared/untyped.a47b2336.cjs'
Require stack:
- /Users/sagalbot/Sites/histoire/node_modules/untyped/dist/index.d.cts
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at _resolve (/Users/sagalbot/Sites/histoire/node_modules/jiti/dist/jiti.js:1:251148)
    at jiti (/Users/sagalbot/Sites/histoire/node_modules/jiti/dist/jiti.js:1:253746)
    at /Users/sagalbot/Sites/histoire/node_modules/untyped/dist/index.d.cts:1:1147
    at evalModule (/Users/sagalbot/Sites/histoire/node_modules/jiti/dist/jiti.js:1:256443)
    at jiti (/Users/sagalbot/Sites/histoire/node_modules/jiti/dist/jiti.js:1:254371)
    at /Users/sagalbot/Sites/histoire/node_modules/@nuxt/kit/dist/index.mjs:4:16
    at evalModule (/Users/sagalbot/Sites/histoire/node_modules/jiti/dist/jiti.js:1:256443)
    at jiti (/Users/sagalbot/Sites/histoire/node_modules/jiti/dist/jiti.js:1:254371) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/sagalbot/Sites/histoire/node_modules/untyped/dist/index.d.cts'
  ]
}

Node.js v18.12.1
 ELIFECYCLE  Command failed with exit code 1.

Process finished with exit code 1

Reproduction

https://github.com/sagalbot/histoire-nuxt-issue

System Info

System:
    OS: macOS 14.2.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 1.29 GB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
    pnpm: 8.10.2 - ~/.config/yarn/global/node_modules/.bin/pnpm
  Browsers:
    Brave Browser: 120.1.61.120
    Chrome: 120.0.6099.234
    Safari: 17.2.1
  npmPackages:
    @histoire/plugin-nuxt: ^0.17.8 => 0.17.8 
    @histoire/plugin-vue: ^0.17.8 => 0.17.8 
    histoire: ^0.17.8 => 0.17.8

Used Package Manager

npm

Validations

shaunnbarron commented 9 months ago

There's been a patch release of untyped to fix this: https://github.com/unjs/untyped/releases/tag/v1.4.2

You should be able to blow away your deps and reinstall.