-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
feat: add docs for registry #6380
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Been keeping an eye on registry development as it relates to #1561 so was excited to see some canary releases on this 🥳 . Since nothing has been officially been released I've been bumbling through the But i've noticed some issues with the routed functions which I assumed was the preferred method to distribute, but am seeing only the public route being mentioned in the docs here.
thought: with the registry function you might need to use |
@lloydrichards interesting. I see we're resolving the path with what's the error in the logs? |
Locally it works as expected, get the JSON and everything good. But deployed in Vercel I get back as a response: {
"error": "Something went wrong"
} And in the vercel logs its reads: Error processing component request: Error: ENOENT: no such file or directory, open '/var/task/registry/button.stories.tsx'
at async (.next/server/app/registry/[name]/route.js:1:62728)
at async tx (.next/server/app/registry/[name]/route.js:1:62649) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/var/task/registry/button.stories.tsx'
} I ran into a similar issue once getting SQLite running on vercel, and the solution was to do with how the folder structure works in serverless, but I'm less sure here whats happeneing. |
just stumbled on the answer while checking what the file is was called: https://vercel.com/guides/how-can-i-use-files-in-serverless-functions Turns out you need to include the This fixes the routed version 👍 |
@lloydrichards oh yeah you're right. I've done same as well but missed that in the docs. I'll fix. |
No description provided.