vue运行项目的时候报错

ERROR Failed to compile with 1 errors 00:02:13

error in ./src/main.js

Module build failed: ReferenceError: Unknown plugin "transform-vue-jsx" specified in "/Users/fanhongyan/Desktop/sell app /.babelrc" at 0, attempted to resolve relative to "/Users/fanhongyan/Desktop/sell app "

at /Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-loader/lib/index.js:50:20)
at Object.module.exports (/Users/fanhongyan/Desktop/sell app /sell/node_modules/babel-loader/lib/index.js:175:20)

@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

阅读 9.6k
1 个回答

npm install babel-plugin-transform-vue-jsx --save-dev

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题