Closed Jhinger closed 1 month ago
If you compare the version of your dependencies to the one in the quick start, are they similar? https://github.com/sst/ion/tree/dev/examples/aws-solid-start
Yeah - everything is the same
"dependencies": {
"@aws-sdk/client-rds-data": "^3.577.0",
"@pulumi/aws": "^6.36.0",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "^1.0.0-rc.0",
"autoprefixer": "^10.4.19",
"drizzle-kit": "^0.21.2",
"drizzle-orm": "^0.29.5",
"postcss": "^8.4.38",
"solid-js": "^1.8.17",
"sst": "ion",
"tailwindcss": "^3.4.3",
"vinxi": "^0.3.11"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@types/aws-lambda": "8.10.138"
},
"overrides": {
"nitropack": "npm:nitropack-nightly@latest"
}
I tried this again following the minimal SolidStart example, and I'm still seeing the same issue when deploying the app so it has to be something on my end - but I'm not exactly sure what.
Edit: Deploying an Astro site works fine - I can see an exported handler in entry.js in the lambda function for the Astro site, however for the Solid app I cannot find any exported handler in index.js so this might be a Solid/nitro specific issue?
what package manager are you using? we have to force use of the nightly of nitropack and it's possible your package manager is not resolving it properly
I'm using npm - I also tried with Bun however and got the same result.
Ah, found my issue - I didn't have any value set for server.preset in app.config.ts 😐. Updating the value to aws-lambda resolved the issue.
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
preset: "aws-lambda"
},
vite: {
resolve: {
alias: {
"@": "/src"
}
},
}
});
Currently trying to deploy a barebones SolidStart app in ion - the build itself is successful and I can preview the app by running
node ./output/server/index.mjs
orsst dev npm run dev
, however when I try to access the app at the cloudfront url I get error code 502 and I see the following error in console.sst:Here is my sst.config:
Any help on resolving this would be appreciated.