{"record":{"id":"a7e7ab82d76ffdbb","repo":"anomalyco/sst","slug":"solidstart-s-app-config-ts-must-be-configured-to-u","errorCode":null,"errorMessage":"SolidStart's app.config.ts must be configured to use the \"aws-lambda\" preset. It is currently set to \"${nitro.preset}\".","messagePattern":"SolidStart's app\\.config\\.ts must be configured to use the \"aws-lambda\" preset\\. It is currently set to \"(.+?)\"\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/solid-start.ts","lineNumber":414,"sourceCode":"    opts: ComponentResourceOptions = {},\n  ) {\n    super(__pulumiType, name, args, opts);\n  }\n\n  protected normalizeBuildCommand() { }\n\n  protected buildPlan(outputPath: Output<string>): Output<Plan> {\n    return outputPath.apply((outputPath) => {\n      // Make sure aws-lambda preset is used in nitro.json\n      const nitro = JSON.parse(\n        fs.readFileSync(\n          path.join(outputPath, \".output\", \"nitro.json\"),\n          \"utf-8\",\n        ),\n      );\n\n      if (![\"aws-lambda\"].includes(nitro.preset)) {\n        throw new VisibleError(\n          `SolidStart's app.config.ts must be configured to use the \"aws-lambda\" preset. It is currently set to \"${nitro.preset}\".`,\n        );\n      }\n\n      // Get base path\n      const appConfig = fs.readFileSync(\n        path.join(outputPath, \"app.config.ts\"),\n        \"utf-8\",\n      );\n      const basepath = appConfig.match(/baseURL: ['\"](.*)['\"]/)?.[1];\n\n      // Remove the .output/public/_server directory from the assets\n      // b/c all `_server` requests should go to the server function. If this folder is\n      // not removed, it will create an s3 route that conflicts with the `_server` route.\n      fs.rmSync(path.join(outputPath, \".output\", \"public\", \"_server\"), {\n        recursive: true,\n        force: true,\n      });","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/solid-start.ts#L396-L432","documentation":"SST builds SolidStart apps through Nitro, which must emit an `aws-lambda` preset output so the resulting `.output` can run on Lambda. After the build, SST reads `.output/nitro.json` and rejects any preset other than `aws-lambda`, failing the deployment with a clear message naming the current preset.","triggerScenarios":"Running `sst deploy` (or dev/build of a SolidStart site) when the project's `app.config.ts` sets a nitro preset other than `aws-lambda` (e.g. `node-server`, `aws_lambda` mis-spelled, `vercel`).","commonSituations":"Migrating an existing SolidStart/Nuxt-style app to SST without changing the preset; copying a starter that used `node-server` for local servers; typos in the preset name that Nitro silently falls back from.","solutions":["Set `preset: \"aws-lambda\"` in the nitro config inside app.config.ts","Delete any stale `.output` directory and rebuild so nitro.json reflects the new preset","Re-run `sst deploy`"],"exampleFix":"// before (app.config.ts)\nexport default defineConfig({\n  vite: {},\n  nitro: { preset: \"node-server\" },\n});\n// after\nexport default defineConfig({\n  vite: {},\n  nitro: { preset: \"aws-lambda\" },\n});","handlingStrategy":"validation","validationCode":"import { readFileSync, existsSync } from \"fs\";\nconst nitroJson = \".output/nitro.json\";\nif (existsSync(nitroJson)) {\n  const preset = JSON.parse(readFileSync(nitroJson, \"utf-8\")).preset;\n  if (preset !== \"aws-lambda\") throw new Error(`Set nitro preset to aws-lambda, got ${preset}`);\n}","typeGuard":"function isAwsLambdaPreset(nitro: { preset: string }): nitro is { preset: \"aws-lambda\" } {\n  return nitro.preset === \"aws-lambda\";\n}","tryCatchPattern":"try {\n  new sst.aws.SolidStart(\"Web\", { path: \"src\" });\n} catch (e) {\n  console.error(\"Fix app.config.ts nitro preset to aws-lambda\");\n  throw e;\n}","preventionTips":["Pin `nitro: { preset: \"aws-lambda\" }` in app.config.ts","Delete .output before rebuilding after changing presets","Keep a CI check that greps app.config.ts for the preset"],"tags":["solidstart","nitro","build","config"],"backgroundTag":"unsupported-build-preset","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}