Closed ishowman closed 1 year ago
@antfu I am not sure the bug is caused by unplugin-vue-components
or vue-tsc
, could you do me a favour?
pnpm vue-tsc -v
return the same typescript version as volar and package.json
, so I can sure they are use the same typescript version.
hi, just put your components.d.ts in src directory
Components({
dts: './src/components.d.ts'
})
hi, just put your components.d.ts in src directory
Components({ dts: './src/components.d.ts' })
I've move the file and change the file path in tsconfig.app.json, and choose Volar: restart vue server
:
Still not work, and pnpm build
still passed with no error:
what is your pkg manager name, npm or pnpm?
your pkg manager is npm or pnpm
pnpm
your pkg manager is npm or pnpm
pnpm
exec pnpm add @vue/runtime-core -D
and restart your ide
your pkg manager is npm or pnpm
pnpm
exec pnpm add @vue/runtime-core -D
and restart your ide
So amazing, why it works but docs didn't tell me to install it? @lishaobos
i think is pnpm bug or limit
i think is pnpm bug or limit
If install dependencies with npm or yarn, it will work normally without pnpm add @vue/runtime-core -D
?
If install dependencies with npm or yarn, it will work normally without
pnpm add @vue/runtime-core -D
?
looks like it.
your pkg manager is npm or pnpm
pnpm
exec pnpm add @vue/runtime-core -D
and restart your ide
If I build project in ci ,and ci do not have any ide to reload,what should I do?
your pkg manager is npm or pnpm
pnpm
exec pnpm add @vue/runtime-core -D and restart your ide
If I build project in ci ,and ci do not have any ide to reload,what should I do?
ci do not need to reload.
your pkg manager is npm or pnpm
pnpm
exec pnpm add @vue/runtime-core -D and restart your ide
If I build project in ci ,and ci do not have any ide to reload,what should I do?
ci do not need
your pkg manager is npm or pnpm
pnpm
exec pnpm add @vue/runtime-core -D and restart your ide
If I build project in ci ,and ci do not have any ide to reload,what should I do?
ci do not need to reload.
ci can't find type error in this case, and will pass when run npm scripts build
.
I found the same issue #355. It's looks like a pnpm bug or feature, and some people provided two ways to solve it
pnpm install @vue/runtime-core
public-hoist-pattern[]=@vue*
or shamefully-hoist=true
at .npmrc
file.finally restart your vscode, It' will be solved.
will it not work in ci for there is no vscode in ci? I am confuse about why restar vscode is necessary, while ci need to run build
script to check types.
will it not work in ci for there is no vscode in ci? I am confuse about why restar vscode is necessary, while ci need to run
build
script to check types.它会在 CI 中不起作用,因为 CI 中没有 VScode?我对为什么需要重新命名 vscode 感到困惑,而 ci 需要运行build
脚本来检查类型。
because need trigger syntax highlighting on vscode, nothing else.
will it not work in ci for there is no vscode in ci? I am confuse about why restar vscode is necessary, while ci need to run
build
script to check types.它会在 CI 中不起作用,因为 CI 中没有 VScode?我对为什么需要重新命名 vscode 感到困惑,而 ci 需要运行build
脚本来检查类型。because need trigger syntax highlighting on vscode, nothing else.
so the type-checking of vue-tsc will work normally if no vscode reload, right?
will it not work in ci for there is no vscode in ci? I am confuse about why restar vscode is necessary, while ci need to run
build
script to check types.它会在 CI 中不起作用,因为 CI 中没有 VScode?我对为什么需要重新命名 vscode 感到困惑,而 ci 需要运行build
脚本来检查类型。because need trigger syntax highlighting on vscode, nothing else.
so the type-checking of vue-tsc will work normally if no vscode reload, right?
yes, 😎
I got similar problem and resolved it with https://github.com/antfu/unplugin-vue-components/issues/635#issuecomment-1560678975
Will be fixed by https://github.com/antfu/unplugin-vue-components/pull/638.
Describe the bug
When I do not install
unplugin-vue-components
:msg
prop should be string but not number;pnpm build
could get the same error type infoAfter install
unplugin-vue-components
, and add comment for import statement:msg
prop is numberpnpm build
succeed and no error infocomponent.d.ts
still declareHelloWorld
componentI am not sure the bug is caused by
unplugin-vue-components
orvue-tsc
, please check it.how i create the repo
create-vue
to create projectunplugin-auto-import
, here is the code diffunplugin-vue-components
, here is the code diff)Reproduction
https://github.com/ishowman/vue3-ts-buiild-bug/tree/vue-components
System Info
Plugins: (already finish setup with volar-takeover-mode)
Used Package Manager
pnpm
Validations