unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
4.9k stars 280 forks source link

[Bug]: Laravel + Inertia + JetStream install into existing project. #75

Closed StaticFX closed 9 months ago

StaticFX commented 1 year ago

Environment

Developement/Production OS: Windows 10 19043.1110
Node version: /
Package manager: pnpm@8.6.0
Radix Vue version: 0.2.3
Shadcn Vue version: latest?
Vue version: 3.2.41
Nuxt version: /
Nuxt mode: /
Nuxt target: /
CSS framework: tailwindcss@3.3.3
Client OS: Windows 10 19043.1110
Browser: Chrome 90.0.4430.212
Laravel version: 9.52
Inertia Version: ^1.0.0

Link to minimal reproduction

/

Steps to reproduce

Install Shadcn Vue into laravel project without typescript/breeze install, and therefore without tsconfig.json or jsconfig.json

Describe the bug

/Users/devinfritz/Documents/Dev/PHP/studio/resources/js/components/ui/switch/Switch.vue 8 | import { cn } from '@/lib/utils' 9 |
10 | const props = defineProps<SwitchRootProps & { class?: string }>() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 |
12 | const emits = defineEmits() at error (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:3601:15) at processDefineProps (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:3658:17) at Object.compileScript (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:4218:43) at resolveScript (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/@vitejs/plugin-vue/dist/index.cjs:272:31) at genScriptCode (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/@vitejs/plugin-vue/dist/index.cjs:2403:18) at transformMain (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/@vitejs/plugin-vue/dist/index.cjs:2219:54) at Object.transform (/Users/devinfritz/Documents/Dev/PHP/studio/node_modules/@vitejs/plugin-vue/dist/index.cjs:2702:16) at file:///Users/devinfritz/Documents/Dev/PHP/studio/node_modules/rollup/dist/es/shared/node-entry.js:25419:40

Expected behavior

Working

Conext & Screenshots (if applicable)

No response

StaticFX commented 1 year ago

Sorry for not providing a link, but it is almost impossible to setup a laravel install the same way on an online editor

zernonia commented 1 year ago

Thanks for the info @StaticFX . This might be issue with Vue 3.2 not supporting the types properly. We had idea of parsing the types into Vue compatible defineProps.

zernonia commented 1 year ago

@StaticFX I believe updating Vue to >3.3 solved the issue right?

rodrigo-fantuci commented 11 months ago

@zernonia I'm still having the same problem after updating vue to 3.3.8 in a project without typescript. Is there another possible fix for this?

sadeghbarati commented 9 months ago

Is the problem exists still? @StaticFX @rodrigo-fantuci

hrynevychroman commented 9 months ago

I think that minimal reproduction on Codesandbox will help to fix this error šŸ™‚

rodrigo-fantuci commented 9 months ago

@sadeghbarati After updating to Vue 3.4 its now fixed for me šŸ‘