conventional-changelog/commitlint

TypeError: format is not a function

Closed

#645 opened on May 7, 2019

 (36 comments) (4 reactions) (0 assignees)TypeScript (896 forks)batch import
bughelp wanted

Repository metrics

Stars
 (15,497 stars)
PR merge metrics
 (Avg merge 12h 56m) (52 merged PRs in 30d)

Description

Expected Behavior

I'm trying to commit in a new repository that uses husky and my commit should work and pass husky checks as expected.

Current Behavior

When I try to commit, I see the following:

husky > commit-msg (node v10.3.0)
/Users/mprzybylski/Work/Livongo/fe-utils/node_modules/@commitlint/cli/lib/cli.js:113
	throw err;
	^

TypeError: format is not a function
    at /Users/mprzybylski/Work/Livongo/fe-utils/node_modules/@commitlint/cli/lib/cli.js:193:18
    at run (/Users/mprzybylski/Work/Livongo/fe-utils/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:75:22)
    at /Users/mprzybylski/Work/Livongo/fe-utils/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:92:30
    at flush (/Users/mprzybylski/Work/Livongo/fe-utils/node_modules/babel-polyfill/node_modules/core-js/modules/_microtask.js:18:9)
    at process._tickCallback (internal/process/next_tick.js:61:11)
husky > commit-msg hook failed (add --no-verify to bypass)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

I'm not sure, and the odd thing is this works in my pre-existing repos, but it fails in this new one.

Steps to Reproduce (for bugs)

  1. Make changes to files.
  2. Commit changes. Error.

I've created a small repo that reproduces the problem here: https://github.com/reintroducing/commit-test

Context

I can't commit to the new repo unless i bypass husky checks. I'm using a custom commitlint config which can be found here: https://github.com/spothero/commitlint-config

Your Environment

Executable Version
commitlint --version 7.5.2
git --version 2.20.1 (Apple Git-117)
node --version 10.3.0

Contributor guide