Astro SST is broken
ironbyte opened this issue · comments
I keep getting this useless error message when trying to deploy my Astro app to AWS
Error: Could not find build meta file at dist/sst.buildMeta.json. Update your 'astro-sst' package version and rebuild your Astro site.
Don't know if it is just me but I think this might be reproducible across machines.
Repo steps:
pnpm create astro
(then change directory into the newly Astro directory)- Run
sst init
and double check that your SST config's all good. Make sure it's set up for AWS. - Run
sst deploy
Expected:
My site should be deployed to AWS and that a generated Cloudfront URL should actually be working without fail. No random issues. More importantly, it should not return null
. At the end of day, it should just work. Please.
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "dark-debris",
removal: input?.stage === "production" ? "retain" : "remove",
home: "aws",
providers: {
aws: {
profile: "dev",
},
},
};
},
async run() {
new sst.aws.Astro("MyWeb");
},
});
{
"name": "dark-debris",
"type": "module",
"version": "0.0.1",
"scripts": {
"astro": "astro",
"build": "astro check && astro build",
"dev": "sst dev astro dev",
"preview": "astro preview",
"start": "astro dev"
},
"dependencies": {
"@astrojs/check": "^0.7.0",
"astro": "^4.10.1",
"astro-sst": "2.43.0",
"sst": "ion",
"typescript": "^5.4.5"
}
}
astro.config.mjs
import { defineConfig } from "astro/config";
// https://astro.build/config
export default defineConfig({});
TL;DR: Skill issue.
Ok, somebody kindly helped me with fixing this issue on SST Discord server. Apparently, my Astro config missed a few mandatory lines. So I updated mine to look like this:
import { defineConfig } from "astro/config";
import aws from "astro-sst";
// https://astro.build/config
export default defineConfig({
output: "server",
adapter: aws(),
});
when you ran sst init
did it not print instructions to add that adapter?