{"record":{"id":"5a4b536dcf31980f","repo":"clockworklabs/SpacetimeDB","slug":"tsc-exited-with-status","errorCode":null,"errorMessage":"tsc exited with {status}","messagePattern":"tsc exited with (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/tasks/javascript.rs","lineNumber":64,"sourceCode":"\n    let mut tsc_path = cwd.join(\"node_modules/.bin/tsc\");\n    if cfg!(windows) {\n        tsc_path.set_extension(\"cmd\");\n    }\n    if tsc_path.exists() {\n        let status = std::process::Command::new(tsc_path)\n            .arg(\"--noEmit\")\n            .current_dir(&cwd)\n            .status()\n            .context(\"Failed to execute tsc\")?;\n        if !status.success() {\n            if let Some(code) = status.code()\n                && let Ok(code) = u8::try_from(code).map(ExitCode::from)\n            {\n                anyhow::bail!(ExitWithCode(code));\n            }\n            // For an abnormal exit, show the details of the status.\n            anyhow::bail!(\"tsc exited with {status}\");\n        }\n    } else {\n        eprintln!(\n            \"tsc not found in node_modules. Make sure you have the `typescript` package \\\n             as a dev-dependency and that your dependencies are installed.\"\n        )\n    }\n\n    let mut bundler = Bundler::new(BundlerOptions {\n        input: Some(vec![\"./src/index.ts\".to_string().into()]),\n        cwd: Some(cwd.clone()),\n        sourcemap: Some(SourceMapType::Inline),\n        external: Some(rolldown::IsExternal::StringOrRegex(vec![\n            // Mark the bindings as external so we don't get a warning.\n            StringOrRegex::Regex(HybridRegex::Optimize(Regex::new(\"spacetime:sys.*\").unwrap())),\n        ])),\n        platform: Some(rolldown::Platform::Browser), // Browser is the correct choice here because it doesn't inject Node.js polyfills.\n        shim_missing_exports: Some(false),","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/tasks/javascript.rs#L46-L82","documentation":"Error \"tsc exited with {status}\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/cli/src/tasks/javascript.rs:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}