es6 string syntax (backticks) throwing error after clean install
See original GitHub issueI’ve tried using node v0.10.37 (which I figured wasn’t likely to work after seeing the backticks) and v0.12.2 (via nvm)… but no matter what i try I can’t get git cz
to execute successfully.
error:
Potentially unhandled rejection [2] evalmachine.<anonymous>:80
commit(`${answers.type}(${answers.scope}): ${answers.subject}`.slice(0,
^
SyntaxError: Unexpected token ILLEGAL
at Object.exports.runInThisContext (vm.js:73:16)
at doEval (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:2330:10)
at __eval (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:2247:7)
at Loader.exec [as __exec] (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:339:5)
at load.metadata.execute (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:1182:16)
at linkDynamicModule (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:668:32)
at link (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:528:11)
at Object.execute (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/dist/system.src.js:842:11)
at doDynamicExecute (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.src.js:1938:25)
at link (/Users/rai/.nvm/versions/v0.12.2/lib/node_modules/commitizen/node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.src.js:1986:24)
my .cz.json
{ “path”: “node_modules/cz-conventional-changelog/” }
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Defer execution for ES6 Template Literals - javascript
I can see three ways around this: Use template strings like they were designed to be used, without any format function: console.log(`Hello, ${"world"}....
Read more >ES6 In Depth: Template strings - the Web developer blog
ES6 introduces a new kind of string literal syntax called template strings . They look like ordinary strings, except using the backtick ......
Read more >add support for template strings (backticks) · Issue #9200
As a consumer of html/template - I am fine for disallowing literals and that go would just return error on executing the template...
Read more >Is it wrong to use backticks (``) everywhere? : r/javascript
backtick strings cannot be used in the ES6 import statement for the module-specifier (also syntax error). My advice is, use backticks only when...
Read more >4 Ways to Combine Strings in JavaScript | SamanthaMing.com
My favourite way is using ES6's Template Strings... ... Did you catch my mistake? ... And that's a super common issue when concatenating...
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 Free
Top 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
@raibutera @kytwb Thank you for working on this. The irony of the good citizen mantra is not lost on me. Thanks for bearing with me! When I created it, I totally forgot that I had switched my nvm global to iojs so this is a bug caused 100% by me and we should probably fix using your much simpler suggestions. 😁
cz-conventional-changelog 1.0.1 released. thanks @kytwb!