current position:Home>Vue NPM startup error - solution

Vue NPM startup error - solution

2022-05-15 05:10:04JavaPub-rodert

My website is online :http://javapub.net.cn/

abnormal

PS E:\myworkpace\pub-admin-vue> npm run dev 

> [email protected] 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>)

solve

What's missing , What to put on , This is the thinking

npm install @vue/babel-plugin-transform-vue-jsx

If it's not solved

Pay attention to your project global variables , It may be caused by incompatibility of multiple packaging methods .

copyright notice
author[JavaPub-rodert],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/135/202205142225417108.html

Random recommended