-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[@astrojs/sitemap] Cannot add static source correctly using vercel on Astro 5 #12663
Comments
By the way, this problem happened on using package import { spawn } from 'node:child_process'
import { dirname, relative } from 'node:path'
import { fileURLToPath } from 'node:url'
import type { AstroIntegration } from 'astro'
export function pagefindConfig(): AstroIntegration {
return {
name: 'pagefind',
hooks: {
'astro:build:done': ({ dir }) => {
const targetDir = fileURLToPath(dir)
const cwd = dirname(fileURLToPath(import.meta.url))
const relativeDir = relative(cwd, targetDir)
return new Promise<void>((resolve) => {
spawn('npx', ['-y', 'pagefind', '--site', relativeDir], {
stdio: 'inherit',
shell: true,
cwd
}).on('close', () => resolve())
})
}
}
}
} (Starlight using Astro v4, where its |
I posted a comment on the PR where I think this was introduced. Currently I'm just working around it by patching this line
unshift to push .
|
@kevinwcyu Can I understand that this is caused by the removal of hydrid? In addition, due to the busy life, I don't have much plan to read the Astro source code, but if you think this is a more correct solution, I think directly submitting the pr to Astro official repository may be a good choice. After all, I want to be able to use Astro v5 in production as soon as possible, rather than letting these functions work wrong to the greatest extent, especially since I already created a lot of development code based on the branch base of Astro v5. |
Interesting! Apologies for the regression, as I noted in my comment on the PR, I knew it could be consequential, but didn't know what it would actually do. I'm not sure what the immediate solution is, as noted I did change the order for a reason, ha. We'll investigate |
@Princesseuh Thank you so much for your reply! I think the problem may actually be more due to not enough testing before this stable version is released, but I guess it doesn't matter if it is reported enough quick! Astro is still the coolest content-driven website framework in my mind, and I will be patient, waiting for your fix! If you need any other details about this problem, please don't hesitate to leave messages here! |
Yeah, the beta has been up for multiple months now, but we'll always miss some edge cases like these. It happens! Hope we can fix this quickly. |
…yment error - sitemaps not available - search (pagefind) is not working - gh issues: - withastro/adapters#445 - withastro/astro#12663 - arcjet/arcjet-docs#332
Any updates on this? |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Firefox
Describe the Bug
This seems only take place in Astro v5.x. The log shows me files are created successfully to Vercel dist directory. But It doesn't show on Vercel static list.
Vercel build log:
While local deployment looks good instead.
Local build log:
What's the expected result?
https://astro-theme-pure.vercel.app/sitemap-index.xml
Link to Minimal Reproducible Example
https://github.com/cworld1/astro-blog-test
Participation
The text was updated successfully, but these errors were encountered: