Repository navigation
Description
Describe the bug
The published registry only serves one item. registry/registry.json in this repo declares 162 items, and scripts/build-registry.ts can generate 155 item files, but https://amicro.vercel.app/r/ only contains card-carousel.json and index.json. So shadcn add @amicro/<anything-else> fails for every other component.
Amicro is listed in the official shadcn registry directory (https://ui.shadcn.com/r/registries.json), so the CLI resolves @amicro out of the box and users hit this immediately.
There are three separate causes, all in the publishing path:
-
scripts/build-registry.tsline 5 hardcodes an absolute path:const WORKSPACE_ROOT = 'c:/Users/we/Desktop/Amicro---Micro-transitions';
The script cannot run on any other machine, including CI.
-
It writes to
registry/, which is not served. Vite servespublic/, and the registry URL registered in the directory ishttps://amicro.vercel.app/r/{name}.json, which maps topublic/r/. -
It writes into type subfolders (
registry/ui/<name>.json), so even underpublic/, the paths would be/r/ui/<name>.jsonrather than the flat/r/<name>.jsonthe registry URL specifies.
The script is also not called by npm run build, so nothing regenerates the output at deploy time.
To Reproduce
# any item other than card-carousel
npx shadcn@latest view @amicro/fade-up
# The item at https://amicro.vercel.app/r/fade-up.json was not found.
curl -s -o /dev/null -w '%{http_code}\n' https://amicro.vercel.app/r/fade-up.json
# 200, but the body is the SPA's index.html, not JSONThe 200 is worth noting: the catch-all rewrite in vercel.json returns index.html for missing paths, so a missing registry item looks like a successful response. The shadcn CLI reports this as Unexpected token '<', which is confusing to debug.
@amicro/card-carousel does resolve correctly, because that one file was committed to public/r/ by hand.
Expected behavior
Every item in registry/registry.json is served at https://amicro.vercel.app/r/<name>.json, so shadcn add @amicro/<name> works for any component.
Screenshots
N/A, this is a build and hosting issue rather than a visual one.
Desktop (please complete the following information):
- OS: Linux
- Browser: N/A, reproduced with curl and the shadcn CLI
- Version: shadcn CLI 4.18.0, Node 24
Smartphone (please complete the following information):
N/A, not device specific.
Additional context
I verified a fix locally. Pointing WORKSPACE_ROOT at process.cwd(), writing to public/r, and flattening the output generates 155 item files. Serving that directory and pointing the CLI at it gives working search and install:
$ shadcn search @amicro -q "loader"
- @amicro/morph-loader (ui) - Gooey/morphing shape loader.
- @amicro/waveform-loader (ui) - Waveform Loader loading animation.
- @amicro/skeleton-loader (ui) - Skeleton Loader loading animation.
$ shadcn view @amicro/fade-up
{ "name": "fade-up", "title": "Fade Up", "description": "Fade with upward translation.", ... }
Happy to open a PR with that change if the approach looks right to you. I left vercel.json alone, since Vercel only applies rewrites when a request does not match a static file, so the misleading 200 should resolve by itself once the files exist.
Activity
Subhan-code commentedon Sep 28, 2026
resolved it thank you :)