{"record":{"id":"7d485d1ac0743579","repo":"anomalyco/sst","slug":"runtime-not-found","errorCode":null,"errorMessage":"runtime not found","messagePattern":"runtime not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runtime/runtime.go","lineNumber":226,"sourceCode":"\t\t\treturn nil, err\n\t\t}\n\t\tciphertext := gcm.Seal(nil, make([]byte, 12), json, nil)\n\t\terr = os.WriteFile(filepath.Join(result.Out, \"resource.enc\"), ciphertext, 0644)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn result, nil\n}\n\nfunc (c *Collection) Run(ctx context.Context, input *RunInput) (Worker, error) {\n\tslog.Info(\"running function\", \"runtime\", input.Runtime, \"functionID\", input.FunctionID)\n\truntime, ok := c.Runtime(input.Runtime)\n\tinput.Env = append(input.Env, \"SST_LIVE=true\")\n\tinput.Env = append(input.Env, \"SST_DEV=true\")\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"runtime not found\")\n\t}\n\treturn runtime.Run(ctx, input)\n}\n\nfunc (c *Collection) ShouldRebuild(runtime string, functionID string, file string) bool {\n\tslog.Info(\"checking if function should be rebuilt\", \"runtime\", runtime, \"functionID\", functionID, \"file\", file, \"runtime\", runtime)\n\tr, ok := c.Runtime(runtime)\n\tif !ok {\n\t\treturn false\n\t}\n\tresult := r.ShouldRebuild(functionID, file)\n\tslog.Info(\"should rebuild\", \"result\", result, \"functionID\", functionID)\n\treturn result\n}\n\nfunc (c *Collection) ShouldRunEagerly(runtime string) bool {\n\tr, ok := c.Runtime(runtime)\n\tif !ok {","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/pkg/runtime/runtime.go#L208-L244","documentation":"Collection.Run resolves the runtime for a function in dev/live mode and returns the unformatted error \"runtime not found\" when c.Runtime(input.Runtime) yields nothing. Unlike the Build path, this variant carries no runtime name, so the function's runtime string or the loaded runtime registrations are the things to check.","triggerScenarios":"`sst dev` invokes a worker for a function whose input.Runtime has no registered runtime in the Collection — function defined with an unsupported/misspelled runtime, or the runtime was registered after this lookup. Note env vars SST_LIVE/SST_DEV are appended before the check, so they're set regardless of outcome.","commonSituations":"Dev session started with a stale CLI that doesn't know a newer runtime used in the config; custom runtime plugin missing in dev mode; runtime name typo only noticed when invoking the function (build path may have been cached).","solutions":["Verify the runtime string for the failing function in sst.config.ts","Ensure any plugin registering the custom runtime is loaded in dev mode","Restart `sst dev` with the same CLI version that supports the configured runtime","Upgrade sst if the runtime is newer than the installed CLI"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"null","typeGuard":null,"tryCatchPattern":"if err := sstDev(); err != nil {\n\tif strings.Contains(err.Error(), \"runtime not found\") {\n\t\t// restart dev with a CLI version that registers the configured runtime\n\t}\n}","preventionTips":["Keep CLI and config in the same sst version","Ensure runtime plugins load identically in dev and deploy paths","Verify runtime names in sst.config.ts before starting dev","Restart the dev session after changing runtime definitions"],"tags":["go","runtime","dev","config"],"backgroundTag":"runtime-not-found","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}