{"record":{"id":"76d7b7de53bf7446","repo":"gastownhall/beads","slug":"from-jsonl-specified-but-s-does-not-exist","errorCode":null,"errorMessage":"--from-jsonl specified but %s does not exist","messagePattern":"--from-jsonl specified but (.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init.go","lineNumber":1818,"sourceCode":"\t\t// sync state that must not be written into the shared, server-owned database.\n\t\t//\n\t\t// It is NOT part of the bootstrap, and neither are the fingerprints\n\t\t// above: those four values are refreshed on EVERY init, adopt or not,\n\t\t// while the identity is written once and adopted forever.\n\t\tif shouldWriteInitStateToDB(doltCfg.Gateway) {\n\t\t\tif err := store.SetMetadata(ctx, \"last_import_time\", time.Now().Format(time.RFC3339)); err != nil {\n\t\t\t\tfmt.Fprintf(os.Stderr, \"Warning: failed to initialize last_import_time: %v\\n\", err)\n\t\t\t\t// Non-fatal - continue anyway\n\t\t\t}\n\t\t}\n\n\t\t// Import from local JSONL if requested (GH#2023).\n\t\t// This must run after the store is created and prefix is set.\n\t\tif fromJSONL {\n\t\t\tlocalJSONLPath := configuredImportJSONLPath(beadsDir)\n\t\t\tif _, statErr := os.Stat(localJSONLPath); os.IsNotExist(statErr) {\n\t\t\t\t_ = store.Close()\n\t\t\t\treturn fmt.Errorf(\"--from-jsonl specified but %s does not exist\", localJSONLPath)\n\t\t\t}\n\t\t\tissueCount, importErr := importFromLocalJSONL(ctx, store, localJSONLPath)\n\t\t\tif importErr != nil {\n\t\t\t\t_ = store.Close()\n\t\t\t\treturn fmt.Errorf(\"failed to import from JSONL: %v\", importErr)\n\t\t\t}\n\t\t\tif !quiet {\n\t\t\t\tfmt.Printf(\"  Imported %d issues from %s\\n\", issueCount, localJSONLPath)\n\t\t\t}\n\t\t}\n\n\t\t// Prompt for contributor mode if:\n\t\t// - In a git repo (needed to set beads.role config)\n\t\t// - Interactive terminal (stdin is TTY) and not --non-interactive\n\t\t// - No explicit --contributor or --team flag provided\n\t\t// - No explicit --role flag provided\n\t\tif isGitRepo() && !contributor && !team && roleFlag == \"\" && !nonInteractive && shouldPromptForRole() {\n\t\t\tpromptedContributor, err := promptContributorMode()","sourceCodeStart":1800,"sourceCodeEnd":1836,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init.go#L1800-L1836","documentation":"`bd init --from-jsonl` imports issues from a local JSONL file (the configured import path under .beads). If that file does not exist, bd closes the store and aborts initialization with this error naming the missing path.","triggerScenarios":"`bd init --from-jsonl` is passed, configuredImportJSONLPath(beadsDir) is stat'd, and os.Stat returns os.IsNotExist.","commonSituations":"User assumes bd will import from a repo's issues.jsonl that is absent or named differently, running from the wrong working directory so beadsDir resolves elsewhere, or the JSONL was gitignored/deleted before init.","solutions":["Create or restore the expected file at the path named in the error (typically .beads/issues.jsonl)","Run bd init from the project root so the .beads path resolves where the JSONL lives","If the data is elsewhere, move/copy it to the configured import path, or set the config/env that changes configuredImportJSONLPath","Drop --from-jsonl if no local import is actually needed"],"exampleFix":"// before (fails)\n$ bd init --from-jsonl   # .beads/issues.jsonl missing\n// after\n$ cp backup/issues.jsonl .beads/issues.jsonl\n$ bd init --from-jsonl","handlingStrategy":"validation","validationCode":"jsonl=.beads/issues.jsonl\nif [ \"$FROM_JSONL\" = 1 ] && [ ! -f \"$jsonl\" ]; then\n  echo \"$jsonl missing — provide it or drop --from-jsonl\"; exit 1\nfi","typeGuard":null,"tryCatchPattern":"bd init --from-jsonl || { echo \"check the path named in the error\"; ls .beads; }","preventionTips":["Run bd init from the project root so .beads resolves correctly","Restore issues.jsonl from backup/git history before using --from-jsonl","Confirm the JSONL filename matches bd's configured import path","Skip --from-jsonl when starting a fresh database"],"tags":["init","jsonl","import","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}