ui icon indicating copy to clipboard operation
ui copied to clipboard

Nuxt UI x server endpoint x storybook

Open harkor opened this issue 9 months ago • 0 comments

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.16.2

Reproduction

https://github.com/harkor/storybook-nuxtui-server

If you want same result without my repo.

npx nuxi init -t ui <app-name>
# Choose nuxt-ui
cd <app-name>
pnpm dlx storybook@latest init
# Example: Add a file like "hello.ts" inside ./server/api
pnpm run storybook

Description

When I want to use Storybook with my Nuxt project with Nuxt UI I have an error (see logs section).

If I remove ./server/api/hello.ts, everything is working.

Tailwind seems to try to import server files that provide the error.

Do we have a config property to disable importing tailwind server folder ?

Additional context

No response

Logs

[12:35:01 PM]  ERROR  Internal server error: Importing from server is not allowed in the Vue part of your app. [importing ../../../../server/api/hello.ts from index.html]
  Plugin: vite:css-analysis

harkor avatar Apr 08 '25 10:04 harkor