SyntaxError: Unexpected reserved word
See original GitHub issueI am trying to add commitlint to an Ionic project. This project is in version 3.
Expected Behavior
It should works like docs.
Current Behavior
I’m getting this error when run commitlint
command.
Explorer.js:54
for await (const place of this.config.searchPlaces) {
^^^^^
SyntaxError: Unexpected reserved word
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/edigleyssonsilva/workspaces/estudaqui/estudaqui/mobile_app/node_modules/@commitlint/load/node_modules/cosmiconfig/dist/index.js:12:17)
Here is my conf file
module.exports = {
extends: ['@commitlint/config-conventional'],
"rules": {
"header-max-length": [0],
"scope-case": [0],
"subject-case": [0]
}
}
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
Steps to Reproduce (for bugs)
- First step
- Second step
commitlint.config.js
```js module.exports = { extends: ['@commitlint/config-conventional'], "rules": { "header-max-length": [0], "scope-case": [0], "subject-case": [0] } } ```Context
Your Environment
Executable | Version |
---|---|
commitlint --version |
I can’t because of the error |
git --version |
2.24.3 |
node --version |
8.17.0 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Debugging Syntax Error Unexpected Reserved Word in ...
The error Unexpected Reserved Word means that the JavaScript compiler saw a reserved word, meaning a keyword special to the compiler, when it ......
Read more >unexpected reserved word import in node.js - Stack Overflow
I've received error unexpected reserved word on import in Node.js file. The lines in file core.module.js is: 'use strict'; import lodashMixins ...
Read more >How to Solve unexpected reserved word await in JavaScript
To solve unexpected reserved word await error in JavaScript, declare your function as async. The error “unexpected reserved word await” ...
Read more >Ubuntu and node getting SyntaxError: Unexpected reserved ...
Ubuntu and node getting SyntaxError: Unexpected reserved word. Hi! I'm having a lot of trouble trying to compile with npm on Ubuntu 22.04....
Read more >SyntaxError: "x" is a reserved identifier - JavaScript | MDN
The JavaScript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers. Message. SyntaxError: Unexpected ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Right, thanks @armano2 !
@geeksilva97 we do not support node version lower than 10 anymore.
This issue is actually not related to
commitlint
, but tocosmiconfig
, as pointed above, we do not support node <10 anymore, to make it work with newer version you must upgrade your node version to >10.