Skip to content

fix(demo): correct path resolution for ghostty-web package#57

Merged
sreya merged 1 commit into
mainfrom
ghostty-web-demo-issue
Nov 25, 2025
Merged

fix(demo): correct path resolution for ghostty-web package#57
sreya merged 1 commit into
mainfrom
ghostty-web-demo-issue

Conversation

@sreya
Copy link
Copy Markdown
Contributor

@sreya sreya commented Nov 25, 2025

No description provided.

The findGhosttyWeb() function was incorrectly resolving the package root
path. The regex /[/\\]dist[/\\].*$/ already strips the path down to
the package root (e.g., '/path/to/node_modules/ghostty-web'), but then
path.dirname() was called which removed one more directory level,
resulting in '/path/to/node_modules' instead.

This caused the 'Could not find ghostty-web package' error when running
npx @ghostty-web/demo because it was looking for the WASM file and dist
folder in node_modules/ instead of node_modules/ghostty-web/.

Fixes the issue where npx @ghostty-web/demo@next fails with:
  Error: Could not find ghostty-web package.
@sreya sreya merged commit d3c37df into main Nov 25, 2025
5 checks passed
@sreya sreya deleted the ghostty-web-demo-issue branch November 25, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant