Skip to content

Bug: Missing shebang in bin entry (dist/server.js) #16

Description

@joebrans-elixus

Bug

The bin field in package.json points to dist/server.js, but the file is missing the #!/usr/bin/env node shebang line at the top.

This means running the package via npx @mastanley13/ghl-mcp-server fails because the OS tries to execute the JS file as a shell script instead of passing it to Node.js.

Error output

ghl-mcp-server: line 1: use strict: command not found
ghl-mcp-server: line 2: /Applications: is a directory
ghl-mcp-server: line 6: syntax error near unexpected token `('

Fix

Add #!/usr/bin/env node as the first line of dist/server.js (ideally in the TypeScript build config so it's added automatically during tsc compilation, or via a post-build script).

Environment

  • macOS (Darwin 25.3.0)
  • Node.js v24.7.0
  • npm via npx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions