unovue / shadcn-vue

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

[Bug]: ENOENT: no such file or directory, stat 'jsconfig.json' #503

Closed doutatsu closed 7 months ago

doutatsu commented 7 months ago

Reproduction

https://stackblitz.com/edit/vitejs-vite-npx4kc

Describe the bug

I've followed regular instructions for Vue + Vite, without Typescript, but I get an error ENOENT: no such file or directory, stat 'jsconfig.json', which I don't see mentioned in the documentation.

image

Looking into it, it seems to be VSCode configuration, yet it's not required anymore from my understanding. If this is a hard requirement for Shadcn-Vue, I think it should be explained in the documentation. Otherwise, it would be great to remove a check for this configuration file

System Info

System:
    OS: macOS 14.3.1
    CPU: (8) arm64 Apple M2
    Memory: 53.59 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.6.1 - ~/.nvm/versions/node/v21.6.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v21.6.1/bin/npm
    pnpm: 8.15.6 - ~/.nvm/versions/node/v21.6.1/bin/pnpm
  Browsers:
    Brave Browser: 121.1.62.153
    Chrome: 123.0.6312.124
    Edge: 123.0.2420.97
    Safari: 17.3.1
  npmPackages:
    @vueuse/core: 10.9.0 => 10.9.0
    vue: 3.4.21 => 3.4.21

Contributes

doutatsu commented 7 months ago

I provided the reproduction link, but it's not really possible to "reproduce it", as it fails simply trying to run the init script (which can be seen failing in the reproduction link as well)

sadeghbarati commented 7 months ago

@doutatsu Hi you need to create jsconfig.json first, it is required, make an empty jsconfig if you don't want to use path aliases, then in CLI you need to choose path like this

jsconfig.json

{

}
doutatsu commented 7 months ago

@sadeghbarati In that case, it'll be great to have it mentioned somewhere in the documentation. Simply following the installation instructions, anyone could hit this issue and not be quite sure what to do

sadeghbarati commented 7 months ago

Right🙏 I'll work on it

sadeghbarati commented 7 months ago

It's now documented on top of Vite installation steps

If you're using the JS template, jsconfig.json must exist for the CLI to run without errors.

ricky11 commented 4 months ago

pls add this to the nuxt install steps too..better still, would be nice to have it created automatically.