Skip to content

Internal server error: shared.genCacheKey is not a function #560

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

Closed
8 of 9 tasks
qyl27 opened this issue Apr 1, 2025 · 2 comments
Closed
8 of 9 tasks

Internal server error: shared.genCacheKey is not a function #560

qyl27 opened this issue Apr 1, 2025 · 2 comments

Comments

@qyl27
Copy link

qyl27 commented Apr 1, 2025

Related plugins

Describe the bug

plugin-vue is incompatible with vite, will causes an internal server error and unable to run vite.

Reproduction

just use npm create vite@latest can reproduce

Steps to reproduce

  1. Use npm create vite@latest to create a vue project
  2. yarn install
  3. yarn dev

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 7 8840U w/ Radeon 780M Graphics
    Memory: 11.09 GB / 29.79 GB
  Binaries:
    Node: 23.9.0 - C:\nvm4w\nodejs\node.EXE
    Yarn: 1.22.22 - C:\nvm4w\nodejs\yarn.CMD
    npm: 11.1.0 - C:\nvm4w\nodejs\npm.CMD
    pnpm: 10.6.5 - C:\nvm4w\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.86)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @vitejs/plugin-vue: ^5.2.3 => 5.2.3
    vite: ^6.2.4 => 6.2.4

Used Package Manager

yarn

Logs

Click to expand!
11:53:12 [vite] (client) Pre-transform error: shared.genCacheKey is not a function
  Plugin: vite:vue
  File: E:/Workspace/mainsite/src/App.vue
11:53:12 [vite] Internal server error: shared.genCacheKey is not a function
  Plugin: vite:vue
  File: E:/Workspace/mainsite/src/App.vue
      at Object.parse$1 [as parse] (E:\Workspace\mainsite\node_modules\@vue\compiler-sfc\dist\compiler-sfc.cjs.js:1764:28)
      at createDescriptor (file:///E:/Workspace/mainsite/node_modules/@vitejs/plugin-vue/dist/index.mjs:71:43)
      at transformMain (file:///E:/Workspace/mainsite/node_modules/@vitejs/plugin-vue/dist/index.mjs:2421:34)
      at TransformPluginContext.transform (file:///E:/Workspace/mainsite/node_modules/@vitejs/plugin-vue/dist/index.mjs:3024:16)
      at EnvironmentPluginContainer.transform (file:///E:/Workspace/mainsite/node_modules/vite/dist/node/chunks/dep-DrOo5SEf.js:47663:19)
      at async loadAndTransform (file:///E:/Workspace/mainsite/node_modules/vite/dist/node/chunks/dep-DrOo5SEf.js:41320:27)
      at async viteTransformMiddleware (file:///E:/Workspace/mainsite/node_modules/vite/dist/node/chunks/dep-DrOo5SEf.js:42796:24)

Validations

@edison1105
Copy link
Member

Can't reproduce it. Please provide a minimal reproduction.

@qyl27
Copy link
Author

qyl27 commented Apr 1, 2025

It maybe my mistake, fully remove the project files and recreate fixed.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants