{"record":{"id":"4506fa6a73ff5190","repo":"facebook/flow","slug":"failed-to-write","errorCode":null,"errorMessage":"failed to write {}: {}","messagePattern":"failed to write (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust_port/crates/flow_cli/src/init_command.rs","lineNumber":145,"sourceCode":"        includes,\n        libs,\n        options,\n        lints,\n    );\n    let config = match config {\n        Ok((config, warnings)) if warnings.is_empty() => config,\n        Ok((_config, warnings)) => error(\n            warnings\n                .into_iter()\n                .map(|flow_config::Warning(line, msg)| (line, msg))\n                .collect(),\n        ),\n        Err(flow_config::Error(line, msg)) => error(vec![(line, msg)]),\n    };\n    let mut out = std::fs::File::create(&file)\n        .unwrap_or_else(|err| panic!(\"failed to create {}: {}\", file.display(), err));\n    flow_config::write(&mut out, &config)\n        .unwrap_or_else(|err| panic!(\"failed to write {}: {}\", file.display(), err));\n}\n\npub(crate) fn command() -> command_spec::Command {\n    command_spec::command(spec(), main)\n}\n","sourceCodeStart":127,"sourceCodeEnd":151,"githubUrl":"https://github.com/facebook/flow/blob/f88ac94bcf6992f5d5a158854d94613ebb92c6e6/rust_port/crates/flow_cli/src/init_command.rs#L127-L151","documentation":"After flow init successfully creates .flowconfig, flow_config::write serializes the config into it. A write failure panics with the path and OS error. The file was just created, so the common causes are ENOSPC (disk full or quota exceeded), EIO (failing disk / flaky network filesystem), or EROFS.","triggerScenarios":"Disk fills up between File::create and the write; user quota (EDQUOT) exhausted on the volume; I/O errors from a failing disk or an NFS/SMB hiccup mid-write.","commonSituations":"CI runners or containers with tiny tmp/root filesystems; corporate machines with home-directory quotas; network-mounted checkouts dropping out during flow init.","solutions":["Free space or raise the quota (df -h ., quota -s), then rerun flow init","If on NFS/network storage, verify mount health and retry after the hiccup passes","Point the project (or TMPDIR) at a local writable volume and retry","Check dmesg/system logs for disk errors if EIO is reported"],"exampleFix":"# before\nflow init   # panics: failed to write .flowconfig: No space left on device\n\n# after\ndf -h .            # identify the full volume\nclean / du -sh *    # free space (or raise quota)\nflow init","handlingStrategy":"validation","validationCode":"# before running flow init\ndf -h .        # abort if the target volume is full\nquota -s 2>/dev/null || true","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep headroom on the volume holding the project and TMPDIR","On quota'd filesystems, budget for config + temp writes during init","Avoid network mounts known to drop mid-write for initial setup"],"tags":["filesystem","disk-full","io","flow-init","config"],"backgroundTag":"disk-full","analyzedSha":"f88ac94bcf6992f5d5a158854d94613ebb92c6e6","analyzedAt":"2026-08-20T10:41:37.992Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}