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

VSCode extension doesn't work #2722

Closed
4 tasks done
Alexandre-Fernandez opened this issue Jun 5, 2023 · 4 comments
Closed
4 tasks done

VSCode extension doesn't work #2722

Alexandre-Fernandez opened this issue Jun 5, 2023 · 4 comments

Comments

@Alexandre-Fernandez
Copy link

UnoCSS version

UnoCSS: 0.53.0 / Extension: v0.22.5

Describe the bug

I followed the installation guide for UnoCSS with astro (https://unocss.dev/integrations/astro), installed the extension and I get the following error in the extension output :

Configuration loaded from
 - uno.config.ts
Error on annotation
TypeError: Cannot read properties of undefined (reading 'join')

Reproduction

create new TS astro project , install UnoCSS integration (https://unocss.dev/integrations/astro)

System Info

linux

Validations

@duxphp
Copy link

duxphp commented Jun 5, 2023

I had the same problem

@johnxu16
Copy link

When I used unocss and extension together in next.js, it had a similar problem.

After debugging the extension, it seems ctx.generator.config.separators is undefined.

You may define separators explicitly in uno.config.ts for solving the problem.

export default defineConfig({
  separators: [":", "-"],
  presets: [
    presetUno(),
  ]

@antfu
Copy link
Member

antfu commented Jun 27, 2023

We temporarily close this due to the lack of enough information.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required

@antfu antfu closed this as completed Jun 27, 2023
@Wxw-Gu
Copy link

Wxw-Gu commented Jul 11, 2023

当我在 next.js 中一起使用 unocss 和扩展时,也遇到了类似的问题。

调试扩展后,似乎ctx.generator.config.separators未定义。

您可以显式定义分隔符uno.config.ts来解决问题。

export default defineConfig({
  separators: [":", "-"],
  presets: [
    presetUno(),
  ]

感谢,它工作了😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants