-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Vercel Adapter Error. #260
Comments
Hi @bencipher For now AstroWind only works with "static" output and for some adapters with "hybrid" output. Also the introduction of the I'll keep you up to date with any changes. I will also mention you when I solve the problem with the Anyway, quick answer, for now AstroWind does not work in SSR with Vercel, only static output. |
Thank you for your response. Regarding the getStaticPath used to generate
the routes, there’s way around it if you’re using server mode which I
already implemented as written in the documentation. Also, the vercel
adapter works locally. I am able to send use the serverless function to
send email. It only fails when one deploys it. When you decide to implement
a fix, from what I read online, it has something to do with some icons
library. I hope that helps. I will investigate further because I need it to
work.
Thank you.
…On Wed, 20 Sep 2023 at 04:37, André B ***@***.***> wrote:
Hi @bencipher <https://github.com/bencipher>
For now *AstroWind* only works with "static" output and for some adapters
with "hybrid" output.
Also the introduction of the config.yaml file (from a simple config.json)
caused a code (to convert from yaml to json) that we have to fix, which you
mention in your issue. That doesn't affect the static output but it does
close the door for a deep revision of AstroWind to make it SSR. At this
time, in addition to that error, the reason why it is not SSR is because of
how the blog is developed. The blog uses getStaticPaths() which is only
for static output and some intelligent configuration would have to be done
so that it could also be coded for SSR without too many complications. I
already have an idea in mind but I haven't had time to code it.
I'll keep you up to date with any changes. I will also mention you when I
solve the problem with the config.yaml.
Anyway, quick answer, for now AstroWind does not work in SSR with Vercel,
only static output.
—
Reply to this email directly, view it on GitHub
<#260 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIB3UN3574RHS243LZBGIDX3JQHHANCNFSM6AAAAAA4TJXMQ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
ABOUT icons: Maybe what you mention about icons is related to this: natemoo-re/astro-icon#111 (comment) In that case, instead of "*" you should put in the astro.config.mjs the exact list of icon names that you are using, as they say there. ABOUT A simple solution would be to manually transform the I've wanted to work on that but I haven't had much time these days. |
Thanks for the tip, I'll check it out and get back to you.
…On Thu, 21 Sep 2023 at 16:59, André B ***@***.***> wrote:
@bencipher <https://github.com/bencipher>
*ABOUT icons:*
Maybe what you mention about icons is related to this: natemoo-re/astro-icon#111
(comment)
<natemoo-re/astro-icon#111 (comment)>
In that case, instead of "*" you should put in the astro.config.mjs the
exact list of icon names that you are using, as they say there.
*ABOUT config.yaml:*
A simple solution would be to manually transform the src/config.yaml to
src/config.json and in src/utils/config.js, instead of that conversion
that exists there with 'fs' and json- yaml, simply import the config.json.
I've wanted to work on that but I haven't had much time these days.
—
Reply to this email directly, view it on GitHub
<#260 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACIB3UIPMD3NSVWT2IL7VHDX3RP4RANCNFSM6AAAAAA4TJXMQ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I get error whenever i tried to use vercel adapter.
Steps to replicate:
Clone the main astrowind branch, then install additional dependency of vercel. Then deploy using vercel CLI.
Modify astro.config.mjs as follows:
import vercel from "@astrojs/vercel/serverless";
export default defineConfig({
output: 'server',
adapter: vercel()
})
#CLI
`challengers_deep > npm i @astrojs/vercel
added 43 packages, and audited 839 packages in 11s
319 packages are looking for funding
run
npm fund
for detailsfound 0 vulnerabilities
challengers_deep > vercel
Vercel CLI 31.2.3
🔍 Inspect: https://vercel.com/bencipher/astrowind/G1AaEkanE5pjYqrCXf5zerCzjaLP [2s]
✅ Preview: https://astrowind-bencipher.vercel.app [29s]
📝 To deploy to production (astrowind-delta.vercel.app), run `vercel --prod``
Vercel Logs:
Error: ENOENT: no such file or directory, open 'src/config.yaml'
at Object.openSync (node:fs:603:3)
at Object.readFileSync (node:fs:471:35)
at file:///var/task/vercel/path0/dist/chunks/pages/404_0e0c8443.mjs:296:29
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'src/config.yaml'
}
RequestId: ffbb4a90-01e7-491a-a68f-40c58dd56cad Error: Runtime exited with error: exit status 1
Runtime.ExitError
The text was updated successfully, but these errors were encountered: