pbakaus/impeccable · warning
Note: could not remove live script tag ({first})
Error message
Note: could not remove live script tag ({first})
What it means
During `impeccable live` shutdown (stop, called by run), the tool tries to remove the injected live script tag by re-running `impeccable live-inject --remove`. If that command fails, it prints the first line of the failing command's output as a non-fatal 'Note:' warning. The live session still ends; the injected script tag may be left behind in the HTML file.
Source
Thrown at crates/live/src/live_server.rs:492
if j.get("removed") == Some(&Value::Bool(true)) {
let file = j
.get("file")
.map(js_display)
.unwrap_or_else(|| "undefined".to_string());
println(io, &format!("Removed live script tag from {}.", file));
}
}
}
} else {
let detail = if !err.trim().is_empty() {
err.trim().to_string()
} else if !out.trim().is_empty() {
out.trim().to_string()
} else {
format!("Command failed: impeccable live-inject --remove")
};
let first = detail.split('\n').next().unwrap_or("");
io.err(&format!(
"Note: could not remove live script tag ({})\n",
first
));
}
}
0
}
/// JS: shutdown()
fn shutdown(shared: &Shared) {
let mut st = lock(shared);
if st.cleaned_up {
return;
}
st.cleaned_up = true;
remove_all_svelte_component_sessions(&st.cwd);
remove_live_server_info(&st.cwd, &st.env);
st.lease_timer_gen += 1;View on GitHub (pinned to 2bc2879276)
Solutions
- Open the HTML file the live session was serving and manually remove the injected live script tag (search for the live/inject marker comment or script).
- Re-run `impeccable live` on the same target and stop it cleanly so removal succeeds.
- Check the file still exists at the original path and is writable (`ls`, permissions) before restarting live mode.
- If a dev server or watcher rewrote the file, stop it, re-add/remove the tag, then restart live.
Example fix
// The injected tag typically looks like: // <script src="http://localhost:PORT/impeccable-live.js"></script> // before (leftover after failed auto-removal) <script src="http://localhost:7d34/impeccable-live.js"></script> // after (manually deleted)
Defensive patterns
Strategy: fallback
Validate before calling
test -f index.html && grep -q 'impeccable-live' index.html && echo 'tag present, removable' || echo 'file missing or tag absent'
Prevention
- Don't delete or rename the injected HTML file while a live session is running.
- Avoid git branch switches/checkouts that touch the target file during a live session.
- Grep for the live script tag after stopping a session and remove it manually if the note appeared.
- Keep dev-server watchers from rewriting the file while live mode is active.
When it happens
Trigger: Running `impeccable live` and stopping it (Ctrl-C or shutdown) when the `live-inject --remove` subcommand exits non-zero or emits an error — e.g. the target HTML file was moved, renamed, deleted, or edited so the marker no longer matches while the session ran.
Common situations: Developer deletes or restructures the entry HTML during a live session; a git checkout/branch switch replaces the injected file; the file is locked by another process (editor, dev server) so the rewrite fails; the project root changed mid-session.
Related errors
- [impeccable live] {msg}
- [impeccable live] resolved app root does not exist: {} (stal
- [impeccable] Svelte component abort cleanup failed:
- [impeccable] Svelte component reset cleanup failed:
- [impeccable] Discarding orphaned session
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/4b4737d33b6d9b81.
Report an issue: GitHub.