Skip to content

Failed to load @vitejs/plugin-vue-jsx due to missing @vue/babel-plugin-jsx dependency #553

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
WoDeXXZ opened this issue Mar 25, 2025 · 3 comments
Closed
8 of 9 tasks

Comments

@WoDeXXZ
Copy link

WoDeXXZ commented Mar 25, 2025

Related plugins

Describe the bug

When running pnpm dev to start the project, Vite configuration fails to load with an error indicating that the @vue/babel-plugin-jsx package is missing, even though it should be a dependency of the @vitejs/plugin-vue-jsx plugin.

Reproduction

Failed to load @vitejs/plugin-vue-jsx due to missing @vue/babel-plugin-jsx dependency

Steps to reproduce

Execute pnpm dev in the project root
Observe the Vite startup error:
Error: Cannot find package '...@vue/babel-plugin-jsx/dist/index.js'

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (28) x64 13th Gen Intel(R) Core(TM) i7-13850HX
    Memory: 13.74 GB / 31.61 GB
  Binaries:
    Node: 20.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.9.0 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (132.0.2957.115)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    "@vitejs/plugin-vue": "^5.0.5",
    "@vitejs/plugin-vue-jsx": "^4.0.0",
    "vite": "^5.2.13",

Used Package Manager

pnpm

Logs

PS C:\Users\TMN1WX\Desktop\me_smt_version_control\test\me_smt_version_control_frontend> pnpm dev

[email protected] dev C:\Users\TMN1WX\Desktop\me_smt_version_control\test\me_smt_version_control_frontend
vite --mode dev

failed to load config from C:\Users\TMN1WX\Desktop\me_smt_version_control\test\me_smt_version_control_frontend\vite.config.ts
error when starting dev server:
Error: Cannot find package 'C:\Users\TMN1WX\Desktop\me_smt_version_control\test\me_smt_version_control_frontend\node_modules.pnpm@[email protected]_vite@5.4.2_@types[email protected][email protected][email protected][email protected][email protected]_\node_modules@vue\babel-plugin-jsx\dist\index.js' imported from C:\Users\TMN1WX\Desktop\me_smt_version_control\test\me_smt_version_control_frontend\node_modules.pnpm@[email protected]_vite@5.4.2_@types[email protected][email protected][email protected][email protected][email protected]_\node_modules@vitejs\plugin-vue-jsx\dist\index.mjs
Did you mean to import "@vue/babel-plugin-jsx/dist/index.js"?
at legacyMainResolve (node:internal/modules/esm/resolve:215:26)
at packageResolve (node:internal/modules/esm/resolve:841:14)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
at ModuleWrap. (node:internal/modules/esm/module_job:96:40)
at link (node:internal/modules/esm/module_job:95:36)
 ELIFECYCLE  Command failed with exit code 1.

Validations

@WoDeXXZ
Copy link
Author

WoDeXXZ commented Mar 25, 2025

Replenish

The following versions will report an error
4.1.2
4.1.1
4.1.0
4.0.1
4.0.0

@jh-leong
Copy link
Contributor

Could you please provide a reproduction?

@WoDeXXZ
Copy link
Author

WoDeXXZ commented Mar 27, 2025

I tried to update the node version and now the problem is solved
This is the current version information

System:
OS: Windows 11 10.0.22631
CPU: (28) x64 13th Gen Intel(R) Core(TM) i7-13850HX
Memory: 10.34 GB / 31.61 GB
Binaries:
Node: 22.14.0 - C:\Program Files\nodejs\node.EXE
npm: 11.2.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.6.5 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (132.0.2957.115)
Internet Explorer: 11.0.22621.3527

@WoDeXXZ WoDeXXZ closed this as completed Mar 27, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 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