运行vue搭建平台,出错ERROR Error: Cannot call .tap() on a plugin that has not yet been defined. 为什么?

INFO Starting development server...
ERROR Error: Cannot call .tap() on a plugin that has not yet been defined. Call plugin('preload').use(<Plugin>) first.
Error: Cannot call .tap() on a plugin that has not yet been defined. Call plugin('preload').use(<Plugin>) first.

at module.exports.tap (C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\webpack-chain\src\Plugin.js:26:15)

at chainWebpack (C:\Users\xx\Documents\GitHub\vue-element-admin\vue.config.js:54:30)

at C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\@vue\cli-service\lib\Service.js:268:40

at Array.forEach (<anonymous>)

at Service.resolveChainableWebpackConfig (C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\@vue\cli-service\lib\Service.js:268:26)

at Service.resolveWebpackConfig (C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\@vue\cli-service\lib\Service.js:272:48)

at PluginAPI.resolveWebpackConfig (C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\@vue\cli-service\lib\PluginAPI.js:132:25)

at serve (C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\@vue\cli-service\lib\commands\serve.js:79:31)

at Service.run (C:\Users\xx\Documents\GitHub\vue-element-admin\node_modules\@vue\cli-service\lib\Service.js:262:12)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)


回答:

你确定你的依赖正确加载了吗?
是不是你 webpack 的版本太低了 不支持 tap ?

建议问题直接上代码,
然后简单描述一下报错,
或者贴关键代码,
这个样大段地 Error 都是无效信息

以上是 运行vue搭建平台,出错ERROR Error: Cannot call .tap() on a plugin that has not yet been defined. 为什么? 的全部内容, 来源链接: utcz.com/p/934245.html

回到顶部