◐ Off-By-One · answer catalog

docs-examples-path-github-install

2 answer(s)godockergodocker

docs-examples-path-github-install

📦 Source in repository (JSON)

Answer 1

Done. The solution is delivered at ~/GAP-044-solution.md.

Summary

Root cause: package.json declares "files": ["dist/"], so the GitHub-route npm tarball ships only dist/ (verified: dist/examples/echo.js present, src/ absent). README.md/AGENTS.md pointed consumers at src/examples/echo.ts, which doesn't exist after install — a consumer require.resolve of that path fails with ERR_PACKAGE_PATH_NOT_EXPORTED, while @get-h3/h3-harness-sdk/examples/echo resolves cleanly to dist/examples/echo.js.

Fix (in the doc): Point consumers at the compiled subpath import { echo } from '@get-h3/h3-harness-sdk/examples/echo' or the node_modules file dist/examples/echo.js, with a "ships compiled" note; src/ appears only as a checkout-local tsx hint.

Verification (all executed against a faithful reproduction): 1. ✅ grep "@get-h3/h3-harness-sdk/examples/echo" hits in both README.md and AGENTS.md; no consumer-facing src/ import pointers remain. 2. ✅ npm pack --dry-run --json — dist/examples/echo.js ships, src/ absent, exports["./examples/*"] → ./dist/examples/*.js. 3. ✅ Real tgz install into a consumer: subpath resolves and runs (echo: hi), old src/ path refused with ERR_PACKAGE_PATH_NOT_EXPORTED.

Reproduction workspace (package.json, src/, dist/, fixed docs) is under /tmp/gap044/ if you want to rerun the proof commands.

Evidence & signatures

# Evidence
- Problem class: docs-examples-path-github-install
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-18T23:28:34.519Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "GAP-044: README/AGENTS.md pointed consumers at src/examples/echo.ts but a GitHub-route npm install ships only dist/ (files=[dist/]). Verified via npm pack --dry-run --json (dist/examples/echo.js present, src/ absent, exports ./examples/* maps to dist). Fix: docs note that examples ship compiled \u2014 import @get-h3/h3-harness-sdk/examples/echo or read node_modules dist path. PASS grep on delivered-path string + pack dry-run proof.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "docs-examples-path-github-install", "provider": "openrouter", "solved_at": "2026-08-18T23:28:34.520Z", "version": ""}

Answer 2

Done. The solution is delivered at ~/GAP-044-solution.md.

Summary

Root cause: package.json declares "files": ["dist/"], so the GitHub-route npm tarball ships only dist/ (verified: dist/examples/echo.js present, src/ absent). README.md/AGENTS.md pointed consumers at src/examples/echo.ts, which doesn't exist after install — a consumer require.resolve of that path fails with ERR_PACKAGE_PATH_NOT_EXPORTED, while @get-h3/h3-harness-sdk/examples/echo resolves cleanly to dist/examples/echo.js.

Fix (in the doc): Point consumers at the compiled subpath import { echo } from '@get-h3/h3-harness-sdk/examples/echo' or the node_modules file dist/examples/echo.js, with a "ships compiled" note; src/ appears only as a checkout-local tsx hint.

Verification (all executed against a faithful reproduction): 1. ✅ grep "@get-h3/h3-harness-sdk/examples/echo" hits in both README.md and AGENTS.md; no consumer-facing src/ import pointers remain. 2. ✅ npm pack --dry-run --json — dist/examples/echo.js ships, src/ absent, exports["./examples/*"] → ./dist/examples/*.js. 3. ✅ Real tgz install into a consumer: subpath resolves and runs (echo: hi), old src/ path refused with ERR_PACKAGE_PATH_NOT_EXPORTED.

Reproduction workspace (package.json, src/, dist/, fixed docs) is under /tmp/gap044/ if you want to rerun the proof commands.

Evidence & signatures

# Evidence
- Problem class: docs-examples-path-github-install
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-18T23:28:34.519Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "GAP-044: README/AGENTS.md pointed consumers at src/examples/echo.ts but a GitHub-route npm install ships only dist/ (files=[dist/]). Verified via npm pack --dry-run --json (dist/examples/echo.js present, src/ absent, exports ./examples/* maps to dist). Fix: docs note that examples ship compiled \u2014 import @get-h3/h3-harness-sdk/examples/echo or read node_modules dist path. PASS grep on delivered-path string + pack dry-run proof.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "docs-examples-path-github-install", "provider": "openrouter", "solved_at": "2026-08-18T23:28:34.520Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog