异常
PS E:\myworkpace\pub-admin-vue> npm run dev
> ruoyi@3.8.2 dev
> vue-cli-service serve
ERROR Error: Cannot find module 'babel-plugin-transform-vue-jsx'
Require stack:
- E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\plugins.js
- E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\index.js
- E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\index.js
- E:\myworkpace\pub-admin-vue\node_modules\@vue\cli-plugin-babel\index.js
- E:\myworkpace\pub-admin-vue\node_modules\@vue\cli-service\lib\Service.js
- E:\myworkpace\pub-admin-vue\node_modules\@vue\cli-service\bin\vue-cli-service.js
Error: Cannot find module 'babel-plugin-transform-vue-jsx'
Require stack:
- E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\plugins.js
- E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\index.js
- E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\index.js
- E:\myworkpace\pub-admin-vue\node_modules\@vue\cli-plugin-babel\index.js
- E:\myworkpace\pub-admin-vue\node_modules\@vue\cli-service\lib\Service.js
- E:\myworkpace\pub-admin-vue\node_modules\@vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at resolve (node:internal/modules/cjs/helpers:108:19)
at tryRequireResolve (E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\plugins.js:157:9)
at resolveStandardizedNameForRequire (E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\plugins.js:195:19)
at sync (E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\plugins.js:224:12)
at sync (E:\myworkpace\pub-admin-vue\node_modules\gensync\index.js:182:19)
at E:\myworkpace\pub-admin-vue\node_modules\gensync\index.js:210:24
at Generator.next (<anonymous>)
at resolvePlugin (E:\myworkpace\pub-admin-vue\node_modules\@babel\core\lib\config\files\plugins.js:83:17)
at resolvePlugin.next (<anonymous>)
解决
缺什么,装什么,是这个思维
npm install @vue/babel-plugin-transform-vue-jsx
如果还没解决
注意你的工程全局变量,可能是多种打包方式不兼容导致。