Skip to content

Build fails: cannot resolve @opencode-ai/ui/v2/text-input-v2.css #30292

@jerome-benoit

Description

@jerome-benoit

Description

vite build of packages/app fails on dev since 363d6d1 (#29689):

[@tailwindcss/vite:generate:build] Can't resolve '@opencode-ai/ui/v2/text-input-v2.css' in 'packages/app/src/components/settings-v2'

This breaks the release/publish workflow, the deploy workflow, the Nix package build, and any local bun run --cwd packages/app build.

Cause

packages/app/src/components/settings-v2/settings-v2.css (added in #29689) imports CSS from the ui package:

@import "@opencode-ai/ui/v2/text-input-v2.css";
@import "@opencode-ai/ui/v2/button-v2.css";

The @opencode-ai/ui exports map only maps ./v2/* to *.tsx:

"./v2/*": "./src/v2/components/*.tsx"

So requests for text-input-v2.css substitute to text-input-v2.css.tsx, which does not exist. The CSS files exist next to their components but are not exposed through the package exports.

Steps to reproduce

git checkout dev
bun install
bun run --cwd packages/app build

Reproduced locally on macOS. Same failure visible in build-cli run 26783826518 and deploy run 26783826509.

OpenCode version

dev @ a821029

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions