82855 Apple Watch CentOS Eclipse H700 iOS iPad iPhone iphone4 iTunes Java Javascript linux Mac MBP MySQL Noteshelf Oracle OS X Parallels Desktop RAID redmine Rocky Linux RockyLinux Snow Leopard SQL SVN Thinkpad Vite VMware Vue Windows Windows 7 Windows 11 Word X40 东航 压缩算法 字体 导航 数据库 朗逸 签证 达美 闹钟

The requested module ‘@vue/devtools-core’ does not provide an export named ‘callViteClientListener’


Vite 项目更换电脑后重新执行报了个错

import { defineViteServerAction, callViteClientListener, initViteServerContext } from '@vue/devtools-core';
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@vue/devtools-core' does not provide an export named 'callViteClientListener'

问了 gemini 也没问出来个所以然,尝试降级 @vue/devtools-core 也没成功。最后查到这里 https://github.com/soybeanjs/soybean-admin/issues/510

应该是 vite-plugin-vue-devtools 里的@vue/devtools-core依赖没有指定版本,而这个东西从 7.0 升级到7.7以后没有了callViteClientListener。尝试将 vite-plugin-vue-devtools 从 7.0.16 升级到 7.3.9 以后解决。改了 package.json 以后

pnpm update

即可了。


发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.