Thanks to visit codestin.com
Credit goes to github.com

Skip to content

happo CLI script missing Unix shebang #339

@sslogar-plaid

Description

@sslogar-plaid

CLI dist/cli/main.js file is missing #!/usr/bin/env node at the very top. This causes pnpm happo to fail on systems where pnpm install prefers symlinking instead of creating command shims, e.g. macOS.

Steps to repro —

  1. pnpm install [email protected]
  2. pnpm happo
/node_modules/.bin/happo: line 1: import: command not found
/node_modules/.bin/happo: line 2: startServer: command not found
/node_modules/.bin/happo: line 3: syntax error near unexpected token `}'
/node_modules/.bin/happo: line 3: `} from "./chunk-JTRP4JVC.js";'

Cross-platform workarounds:

  1. Directly-running script: node node_modules/happo/dist/cli/main.js
  2. Forcing PNPM to create command shims:
// pnpm-workspace.yaml
preferSymlinkedExecutables: false

Seems to have originated in #311.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions