-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
Cloudflare integration with theme may be broken #44
Comments
Hello @mailman-2097 If you're not having any advantages provided by SSR, it's recommended to host AstroPaper as a static site directly on Cloudflare Pages instead of using @astro/cloudflare SSR adapter. In this way, you'll have all the features of AstroPaper such as automatic sitemap generation, dynamic OG image generation etc. However, if you only want to use SSR for some reason, you can do the following
// astro.config.mjs
...
sitemap({
customPages: ['https://nishad-link.pages.dev//posts/post-1', 'https://nishad-link.pages.dev//posts/post-2']
}), Your build process should be working fine after these step. Above methods resolve your problems hopefully. If you still have some problems, let me know. |
Hi @satnaing, Many thanks for your response. Fortunately, I will close the issue. I realised today the Cloudflare integration was for SSR support, which is not something I need. So I just ripped it out. This is my first Nodejs project, hence the problem was not obvious to me and you were able to call this out as well. But many thanks for your support. |
Disable Cloudflare SSR, see satnaing#44
hey @mailman-2097 just for your information I am deploying on cloudflare pages, you can checkout my repository if you want :) |
Sure will do. Thank you for the note. 👍 |
and regarding node version , yeah I got the same issue, then I decided to build the project on github actions, because I can define the node version and after generate the dist folder with the static site, I deploy the files on cloudflare page unfurtunally you can't use the default integration from cloudflare, otherwise you gonna build your project on that, and you gonna be stuck on this node version problem :/ then I would suggest you deploy via pipelines, it leads more work but you have full control. I hope it helps you :) |
I am getting a lot of errors when running the npm run build.
I tried the following options to triage the issue:
a. changed the node versions using nvm, but now pegged to latest v16.19.1 lts/gallium release
b. Did a diff of all the changes from the original template and my current project, to rule out any disruptive changes.
The major change is the cloudflare integration and the changes in the package and package-lock files
Raised a support request with Astro team on discord.
The theme works as expected; the original template has no issues with
npm run build
on lts/galliumCloudflare integration may be the issue.
build.error.log
The text was updated successfully, but these errors were encountered: