Skip to content

Missing shebang ( #!/usr/bin/env node ) #2

@mrslwiseman

Description

@mrslwiseman

Hi,
After looking at a lot of these ES migration runners I settled on yours, its pretty good.
However there is an issue when running it like so:

› npx elasticsearch-migrate up                      
/Users/matt/sine/sinecloud-elasticsearch-api/node_modules/.bin/elasticsearch-migrate: line 1: use strict: command not found
/Users/matt/sine/sinecloud-elasticsearch-api/node_modules/.bin/elasticsearch-migrate: line 2: syntax error near unexpected token `('
/Users/matt/sine/sinecloud-elasticsearch-api/node_modules/.bin/elasticsearch-migrate: line 2: `var __importDefault = (this && this.__importDefault) || function (mod) {'

After some investigation I've found that adding a #!/usr/bin/env node shebang to (my-project/node_modules/.bin/elasticsearch-migrate)the issue is resolved.
If the shebang is added to the cli.ts file it is copied across by the TS compiler.

I see what you've done in elasticsearch-migrate/bin/elasticsearch-migrate by importing the built files but it doesn't appear to be working 😞

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