Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cannot read properties of null (reading 'invalidateTypeCache')#279

Unanswered
npmrun asked this question inQ&A
Discussion options

image
这里不需要判断compiler是不是为空吗,有时候会是空的,比如在启用unplugin-auto-import中的dts时,每次都会写一遍auto-imports.d.ts导致出现热更新事件,如果这个热更新事件快过vite-plugin-vue的compiler赋值,会报如下错误:
image

我这个项目时必现的,新建的项目就挺难复现,但还是有很小的几率

You must be logged in to vote

Replies: 2 comments

Comment options

你好,问题解决了吗

You must be logged in to vote
0 replies
Comment options

我在astro的issues 找到了一个解决方案
vite.config.ts 中
import * as compiler from 'vue/compiler-sfc';
然后再plugins 中修改
plugins: [
vue({compiler}),
..................

withastro/astro#12969

ps: 我没有深入研究过,但这个确实可以让这个错误消失

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@npmrun@jiuyue1123@MagicianAT

[8]ページ先頭

©2009-2025 Movatter.jp