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
[Bug]: Can't install Drawer
, Dialog
and Toast
in WSL
#430
Comments
@adiramardiani Can you share repro with Laravel? I'm using a normal Vite project and it's ok Toast.vue
<script setup>
import { computed } from "vue";
import { ToastRoot, useForwardPropsEmits } from "radix-vue";
import { toastVariants } from ".";
import { cn } from "@/lib/utils";
const props = defineProps({
class: { type: null, required: false },
variant: { type: null, required: false },
onOpenChange: { type: Function, required: false, skipCheck: true },
defaultOpen: { type: Boolean, required: false },
forceMount: { type: Boolean, required: false },
type: { type: String, required: false },
open: { type: Boolean, required: false },
duration: { type: Number, required: false },
asChild: { type: Boolean, required: false },
as: { type: null, required: false },
});
const emits = defineEmits([
"escapeKeyDown",
"pause",
"resume",
"swipeStart",
"swipeMove",
"swipeCancel",
"swipeEnd",
"update:open",
]);
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props;
return delegated;
});
const forwarded = useForwardPropsEmits(delegatedProps, emits);
</script>
<template>
<ToastRoot
v-bind="forwarded"
:class="cn(toastVariants({ variant }), props.class)"
@update:open="onOpenChange"
>
<slot />
</ToastRoot>
</template>
Drawer.vue
<script setup>
import { DrawerRoot } from "vaul-vue";
import { useForwardPropsEmits } from "radix-vue";
const props = defineProps({
activeSnapPoint: { type: [Number, String, null], required: false },
closeThreshold: { type: Number, required: false },
shouldScaleBackground: { type: Boolean, required: false, default: true },
scrollLockTimeout: { type: Number, required: false },
fixed: { type: Boolean, required: false },
dismissible: { type: Boolean, required: false },
modal: { type: Boolean, required: false },
open: { type: Boolean, required: false },
defaultOpen: { type: Boolean, required: false },
nested: { type: Boolean, required: false },
snapPoints: { type: Array, required: false },
fadeFromIndex: { type: null, required: false },
});
const emits = defineEmits([
"drag",
"release",
"close",
"update:open",
"update:activeSnapPoint",
]);
const forwarded = useForwardPropsEmits(props, emits);
</script>
<template>
<DrawerRoot v-bind="forwarded">
<slot />
</DrawerRoot>
</template> |
closing for now will reopen after repro 🙏 |
Here my github repo https://github.com/adiramardiani/laravel-shadcn-vue Here my package.json generated by breeze and shadcn ini {
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build && vite build --ssr"
},
"devDependencies": {
"@inertiajs/vue3": "^1.0.15",
"@tailwindcss/forms": "^0.5.7",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/server-renderer": "^3.4.21",
"autoprefixer": "^10.4.19",
"axios": "^1.6.8",
"laravel-vite-plugin": "^1.0.2",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.1",
"vite": "^5.2.4",
"vue": "^3.4.21"
},
"dependencies": {
"@radix-icons/vue": "^1.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"radix-vue": "^1.5.3",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7"
}
}
Btw, the Thanks |
Let me try with breeze cause I don't install any requirements for Laravel in my local |
My node version is Can you try with pnpm, please remove package-lock and node_modules, and install everything fresh |
Sure, I downgrade node and pnpm like your config, remove lock and node_modules, but still the same :) node Btw this is wsl2 on windows, I dont know this is the clue or not |
Drawer
and Toast
in Laravel Breeze
I will test on WSL tomorrow, also I will send the minimal breeze project here in zip format |
I am having this same issue on WSL2 |
Drawer
and Toast
in Laravel BreezeDrawer
, Dialog
and Toast
in WSL
@justinkekeocha reported the same issue on WSL, so I change to title Btw @sadeghbarati |
@Dunqing Hi can you check these problems it is related to detypes
Error is in these lines |
I am seeing the same issue on MacOS (latest version), running Node v20.11.0 and NPM v10.2.4. Basically unable to install any of the components |
Coincidentally I am using the same NPM version with node v20.11.1 |
Same issue on Mac with bun 1.1.1
Seems to be an issue with the detype. probably not as reading a bit more it's just a personal pet project. But something similar would be awesome... |
I am having this same issue when trying to install the drawer on a Laravel/Vite project by Error: |
I also encountered the same problem. When I use dialog, export { default as DialogScrollContent } from "./DialogScrollContent.vue"; there is an error of 'Unexpected identifier 'as''. It's still a compatibility issue between ts and js |
WSL(linux) and Mac, so maybe this bug is related with something OS level difference between UNIX system and Windows. |
Yup, same issue Typescript disabled on Linux in a Laravel sail app sail npx shadcn-vue@latest add drawer
⠴ Installing drawer...
[12:23:29 PM] ERROR ENOTDIR: not a directory, stat '/var/www/html/node_modules/vaul-vue/dist/index.d.ts/tsconfig.json' |
I solved this issue by initializing a new nuxt project, installing shadcn-vue and moving files. Seems shadcn-vue is not built to be installed on already existing projects. |
I tried, but Nuxt projects dont work without typescript as seen on #291 |
Reproduction
npx shadcn-vue@latest add drawer / toast
Describe the bug
I'm ini using laravel framework configuration and set typescript as false
I don't know this will show just on laravel framework or other framework
Here my components.json
I try command :
The component output still using typescript template instead of javascript
System Info
Contributes
The text was updated successfully, but these errors were encountered: