{"record":{"id":"3e8653e7d25e88c0","repo":"DioxusLabs/dioxus","slug":"failed-to-create-directory-for-hash-file-in","errorCode":null,"errorMessage":"Failed to create directory for hash file: {} in {}","messagePattern":"Failed to create directory for hash file: (.+?) in (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/lazy-js-bundle/src/lib.rs","lineNumber":84,"sourceCode":"                        .unwrap_or(false)\n                    {\n                        watching_paths.push(path);\n                    }\n                }\n            } else {\n                watching_paths.push(path.to_path_buf());\n            }\n        }\n        for path in &watching_paths {\n            println!(\"cargo:rerun-if-changed={}\", path.display());\n        }\n\n        // Compute the hash of the input files\n        let hashes = hash_files(watching_paths);\n\n        let hash_location = PathBuf::from(\"./src/js/\");\n        std::fs::create_dir_all(&hash_location).unwrap_or_else(|err| {\n            panic!(\n                \"Failed to create directory for hash file: {} in {}\",\n                err,\n                hash_location.display()\n            )\n        });\n        let hash_location = hash_location.join(\"hash.txt\");\n\n        // If the hash matches the one on disk, we're good and don't need to update bindings\n        let fs_hash_string = std::fs::read_to_string(&hash_location);\n        let expected = fs_hash_string\n            .as_ref()\n            .map(|s| s.trim())\n            .unwrap_or_default();\n        let hashes_string = format!(\"{hashes:?}\");\n        if expected == hashes_string {\n            return;\n        }\n","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/lazy-js-bundle/src/lib.rs#L66-L102","documentation":"The lazy-js-bundle build script could not create the ./src/js/ directory it uses to cache per-file hashes before writing the hash file. An IO error (permissions, read-only source tree) from create_dir_all triggers this panic in run().","triggerScenarios":"Thrown at packages/lazy-js-bundle/src/lib.rs:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The directory for the hash file cannot be created. Fix the output path and check parent directory permissions."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}