Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrslwiseman opened this issue Feb 8, 2022 · 0 comments
Open

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

mrslwiseman opened this issue Feb 8, 2022 · 0 comments

Comments

@mrslwiseman
Copy link

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 😞

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

No branches or pull requests

1 participant