GithubHelp home page GithubHelp logo

Comments (14)

adiramardiani avatar adiramardiani commented on June 2, 2024 2

Hmm, is bug just show on my environment only ? hahaha
What your node / pnpm version ?
Btw this is my node, pnpm, and npm version, maybe because my node version

image

I try to create vite project, but the result is same
image

I think this not related laravel or vite, but because some node or etc version
So if you have any other task issue, you can igonre this issue :)

Thank's for your help
Big respect

from shadcn-vue.

adiramardiani avatar adiramardiani commented on June 2, 2024 1

@justinkekeocha reported the same issue on WSL, so I change to title

Btw @sadeghbarati
I found new issue on wsl using typescript false, I add dialog component and give as HTMLElement on DialogScrollContent file which is is typescript code, maybe for me is easy fix to edit on code, but just info
So I change the title to add Dialog to

image

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

@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 should be fixed after this commit cd3d244

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>

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

closing for now will reopen after repro 🙏

from shadcn-vue.

adiramardiani avatar adiramardiani commented on June 2, 2024

Hi @sadeghbarati

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 Drawer still not fixed on my test

image

Thanks

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

Let me try with breeze cause I don't install any requirements for Laravel in my local

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

@adiramardiani

image

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

My node version is 20.11.1 and pnpm is 8.15.5, always on LTS and latest version for other tools

Can you try with pnpm, please remove package-lock and node_modules, and install everything fresh

from shadcn-vue.

adiramardiani avatar adiramardiani commented on June 2, 2024

Sure, I downgrade node and pnpm like your config, remove lock and node_modules, but still the same :)

node v20.11.1
npm 10.2.4
pnpm 8.15.5

image

Btw this is wsl2 on windows, I dont know this is the clue or not
Maybe we can ignore this issue, and can wait n see, hopefully will fixed or can found the cause later

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

I will test on WSL tomorrow, also I will send the minimal breeze project here in zip format

from shadcn-vue.

justinkekeocha avatar justinkekeocha commented on June 2, 2024

I am having this same issue on WSL2

from shadcn-vue.

sadeghbarati avatar sadeghbarati commented on June 2, 2024

@Dunqing Hi can you check these problems it is related to detypes

  • CLI is not working well in WSL/WSL2 (test with drawer, and toast)

  • ts types inside <template> is preserved in JS projects


Error is in these lines
https://github.com/radix-vue/shadcn-vue/blob/dev/packages/cli/src/commands/add.ts#L194C9-L215C10

from shadcn-vue.

Reached avatar Reached commented on June 2, 2024

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

from shadcn-vue.

justinkekeocha avatar justinkekeocha commented on June 2, 2024

Coincidentally I am using the same NPM version with node v20.11.1

from shadcn-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.