HarperFast / HarperFast/harper

Inspector port conflict when HarperDB is imported multiple times in Next.js

Open
#827 0 comments 0 reactions 0 assignees View on GitHub
area:components bug from-jira
Dominant language
JavaScript
Stars
89
Forks
10
Avg merge
2d 6h
Merged PRs (30d)
200

Description

## Problem

When a Next.js app imports `harperdb` (e.g., `import('harperdb')`), Harper's initialization runs multiple times across Next.js build/runtime phases. With thread debugging enabled this causes repeated errors:

```
Starting inspector on 127.0.0.1:9229 failed: address already in use
```

Harper should guard against re-initialization when already running in the same process, or detect/handle the address-in-use case gracefully for the inspector.

🤖 Filed by Claude on behalf of Kris.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.