-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Syntax error "(" unexpected #211
Comments
I have got the same problem 👍 |
Hi @SturmB 👋 Thank you for opening this issue 🙏 I don't have npm 7.6 on my current computer to give it a try but I'll check it as soon as possible. Can you also share your node version, please? |
I am getting this issue with the following versions: |
So, this appears to be a bit spotty when it comes to different node/npm versions. Some of them work fine while others throw that 'Syntax error: "(" unexpected' message. For example: [✔] node 14.17.4 / npm 6.14.14 (latest LTS release) |
I just install |
If someone is interested in investigating why it happens it could be really helpful🙏 |
My question is why we use this: gitmoji-changelog/packages/gitmoji-changelog-cli/package.json Lines 20 to 22 in 0522b87
Finished investigating, and came to the conclusion that it must be installed globally ( |
We use bin because this the way to declare a cli. Here is the documentation https://docs.npmjs.com/cli/v8/configuring-npm/package-json#bin |
It seems the shebang |
ping @frinyvonnick, I think that proposed solution from @jpolo is sufficient. |
Still facing this issue. node: |
Was getting the same issue after updating node to |
I updated npm to v7.6.0 today and now gitmoji-changelog is consistently giving me an error:
$ npx gitmoji-changelog /home/sturm/.npm/_npx/989ebc59bfc33b01/node_modules/.bin/gitmoji-changelog: 1: Syntax error: "(" unexpected
Before this, the first time I tried to run it after upgrade npm, it asked to be installed again for some reason, then gave me several warnings:
I can confirm that this is specific to npm 7.6+ (possibly all of 7+). Downgrading back to my previous version, npm@6.14.9, fixes the issue for now; no warnings and no syntax errors.
The text was updated successfully, but these errors were encountered: