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

Cannot find @babel/runtime with Ant Design Vue #771

Open
6 tasks done
c01nd01r opened this issue Dec 4, 2024 · 1 comment
Open
6 tasks done

Cannot find @babel/runtime with Ant Design Vue #771

c01nd01r opened this issue Dec 4, 2024 · 1 comment
Labels
to triage This issue needs to be triaged

Comments

@c01nd01r
Copy link

c01nd01r commented Dec 4, 2024

Describe the bug

Hello!

I tried using Histoire with Ant Design Vue on a [email protected] (Vite 5) starter template, but during story collection, Histoire throws an error:

Cannot find module <project>/node_modules/@babel/runtime/helpers/esm 
imported from file:///home/projects/vitejs-vite-cmhkz4, 
file:///home/projects/, 
file:///home/projects/vitejs-vite-cmhkz4/_index.js, 
file:///home/projects/node_modules
Full Log
Collect stories start MyButton
Error while collecting story /home/projects/vitejs-vite-cmhkz4/src/MyButton.story.vue:
Error: Cannot find module /home/projects/vitejs-vite-cmhkz4/node_modules/@babel/runtime/helpers/esm imported from file:///home/projects/vitejs-vite-cmhkz4, file:///home/projects/, file:///home/projects/vitejs-vite-cmhkz4/_index.js, file:///home/projects/node_modules
    at _resolve (file:///home/projects/vitejs-vite-cmhkz4/node_modules/mlly/dist/index.mjs:2155:19)
    at resolveSync (file:///home/projects/vitejs-vite-cmhkz4/node_modules/mlly/dist/index.mjs:2164:10)
    at resolvePathSync (file:///home/projects/vitejs-vite-cmhkz4/node_modules/mlly/dist/index.mjs:2174:24)
    at resolvePath (file:///home/projects/vitejs-vite-cmhkz4/node_modules/mlly/dist/index.mjs:2178:28)
    at Module.isValidNodeImport (file:///home/projects/vitejs-vite-cmhkz4/node_modules/mlly/dist/index.mjs:2638:30)
    at _shouldExternalize (file:///home/projects/vitejs-vite-cmhkz4/node_modules/vite-node/dist/server.mjs:95:38)
    at shouldExternalize (file:///home/projects/vitejs-vite-cmhkz4/node_modules/vite-node/dist/server.mjs:72:19)
    at ViteNodeServer.shouldExternalize (file:///home/projects/vitejs-vite-cmhkz4/node_modules/vite-node/dist/server.mjs:242:12)
    at ViteNodeServer._fetchModule (file:///home/projects/vitejs-vite-cmhkz4/node_modules/vite-node/dist/server.mjs:339:36)
    at ViteNodeServer.fetchModule (file:///home/projects/vitejs-vite-cmhkz4/node_modules/vite-node/dist/server.mjs:278:14)
Collect stories end 21ms
  • Error occurs with any Ant Design Vue components in my components or stories.
  • Components work normally in standard Vite dev mode.
  • Stackblitz sandbox from Histoire docs (with older Vite 4 dependencies) works fine.

A Stackblitz reproduction link is attached for reference.

Reproduction

Stackblitz Sandbox (from vite.new/vue-ts with Vite 5)
https://stackblitz.com/edit/vitejs-vite-cmhkz4?file=src%2FMyButton.vue

System Info

System:
    OS: macOS 14.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 84.05 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.local/state/fnm_multishells/47145_1733320207250/bin/node
    Yarn: 1.22.22 - ~/.local/state/fnm_multishells/47145_1733320207250/bin/yarn
    npm: 10.2.4 - ~/.local/state/fnm_multishells/47145_1733320207250/bin/npm
    pnpm: 9.14.4 - ~/.local/state/fnm_multishells/47145_1733320207250/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.87
    Safari: 17.1
  npmPackages:
    ant-design-vue: ^4.2.6 => 4.2.6
    @histoire/plugin-vue: ^0.17.17 => 0.17.17 
    @vitejs/plugin-vue: ^5.1.4 => 5.2.1 
    @vitejs/plugin-vue-jsx: ^4.0.1 => 4.1.1 
    histoire: ^0.17.17 => 0.17.17 
    vite: ^5.4.10 => 5.4.11

Used Package Manager

npm

Validations

@c01nd01r c01nd01r added the to triage This issue needs to be triaged label Dec 4, 2024
Copy link

stackblitz bot commented Dec 4, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

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