Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 3.3.0-beta definesProps with import seem cache (order ?) dependent ? #8244

Closed
ppierre opened this issue May 6, 2023 · 0 comments
Closed

Comments

@ppierre
Copy link

ppierre commented May 6, 2023

Vue version

3.3.0-beta

Link to minimal reproduction

https://github.com/ppierre/test-bug-vue-3.3-defineprops-with-import

Steps to reproduce

npm i -f && npm run dev

What is expected?

Should work fine.
Sadly it is a assignment support it worker for me and for some student.
But not for every body, I have version of the same code who work without any meaning-full difference !

What is actually happening?

[plugin:vite:vue] [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

Bug with defineProps and TypeScript import :
MaisonCard.vue

// Bug
import type { MaisonResponse } from '@/pocketbase-types'
// Work with extra import `MaisonRecord`
import type { MaisonResponse, MaisonRecord } from '@/pocketbase-types'
defineProps<MaisonResponse>()

pocketbase-types.ts

export type MaisonResponse = Required<MaisonRecord> & BaseSystemFields

Error message :

[plugin:vite:vue] [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

<snip>.../src/components/MaisonCard.vue
<snip>.../src/components/MaisonCard.vue
    at ScriptCompileContext.error (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:15839:11)
    at innerResolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17964:20)
    at resolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17900:35)
    at resolveBuiltin (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18222:13)
    at innerResolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17952:20)
    at resolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17900:35)
    at <snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17922:31
    at Array.map (<anonymous>)
    at innerResolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17922:20)
    at resolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17900:35

System Info

System:
    OS: macOS 13.3.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 4.31 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.1.0 - /opt/homebrew/bin/node
    npm: 9.6.4 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 105.1.43.89
    Chrome: 113.0.5672.63
    Firefox: 112.0.2
    Safari: 16.4
  npmPackages:
    vue: ^3.3.0-beta.2 => 3.3.0-beta.2

Any additional comments?

No response

@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant