question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Travis ci failing - SyntaxError: Use of const in strict mode.

See original GitHub issue

I followed the tutorial for Travis CI configuration here: https://commitlint.js.org/#/guides-ci-setup

After creating a PR here: https://github.com/vojtechruz/commitlint-example/pull/2

My Travis build failed with the following error:

const execa = require('execa');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:945:3

My .travis.yml:

language: node_js
script:
  - commitlint-travis

My commitlint config file:

module.exports = {
    extends: ['@commitlint/config-conventional']
};

My dependencies:

  "devDependencies": {
    "@commitlint/cli": "^8.2.0",
    "@commitlint/config-conventional": "^8.2.0",
    "@commitlint/travis-cli": "^8.2.0",
    "husky": "^3.0.9"
  }

Full log: log.txt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vojtechruzcommented, Nov 27, 2019

Created PR with node version defined so the build does not break.

https://github.com/conventional-changelog/commitlint/pull/871

0reactions
byCedriccommented, Jan 26, 2020

Closed by #871

Read more comments on GitHub >

github_iconTop Results From Across the Web

Travis-CI Uncaught SyntaxError Use of const in strict mode
Node.JS was throwing an error for "Uncaught SyntaxError Use of const in strict mode" and failing to run the tests.
Read more >
Uncaught SyntaxError: Use of const in strict mode | Travis-ci ...
I'm trying to get my karma tests running in a travis-ci build. I figured out how to get chromium going, but now it...
Read more >
Common Build Problems - Travis CI Docs
Depending on the tool in use, this can be caused by a few things: Ruby test suite consuming too much memory; Tests running...
Read more >
CI Fails with : SyntaxError: Use of const in strict mode
I follow the steps here to create a build definition: ... CI Fails with : SyntaxError: Use of const in strict mode. Discussion...
Read more >
https://www.emma-matratze.de/skin/frontend/rwd/lum...
SyntaxError : Use of const in strict mode. ... It is recommended that you use `includePaths` in conjunction with this so that [LibSass]...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found