carloscuesta / gitmoji-cli

A gitmoji interactive cli tool for using emojis on commits. 💻
https://www.npmjs.com/package/gitmoji-cli
MIT License
4.59k stars 206 forks source link

timedPromise.finally is not a function #276

Closed gaoryrt closed 4 years ago

gaoryrt commented 4 years ago

Hello @carloscuesta!

When I finished messaging gitmoji -c, I got such message: timedPromise.finally is not a function Issue:

  1. update gitmoji-cli to v3.1.0, I didn't encounter this issue in v3.0.0
  2. set alias gac="git add . && gitmoji -c"
  3. gac
  4. fill all the blanks and press enter

OS: macOS Mojave 10.14.3 gitmoji-cli -v: 3.1.0 Node version: 8.12.0

{ TypeError: Command failed: git rev-parse --absolute-git-dir
timedPromise.finally is not a function
    at setExitHandler (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/node_modules/execa/lib/kill.js:102:29)
    at execa (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/node_modules/execa/index.js:100:22)
    at isHookCreated (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/lib/utils/isHookCreated.js:20:34)
    at withClient (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/lib/commands/commit/withClient/index.js:26:42)
    at _inquirer.default.prompt.then.answers (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/lib/commands/commit/index.js:24:38)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
  originalMessage: 'timedPromise.finally is not a function',
  shortMessage: 'Command failed: git rev-parse --absolute-git-dir\ntimedPromise.finally is not a function',
  command: 'git rev-parse --absolute-git-dir',
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false }
{ TypeError: Command failed: git commit -m :lipstick: update style -m
timedPromise.finally is not a function
    at setExitHandler (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/node_modules/execa/lib/kill.js:102:29)
    at execa (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/node_modules/execa/index.js:100:22)
    at withClient (/Users/gaoryrt/.config/yarn/global/node_modules/gitmoji-cli/lib/commands/commit/withClient/index.js:33:34)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
  originalMessage: 'timedPromise.finally is not a function',
  shortMessage: 'Command failed: git commit -m :lipstick: update style -m \ntimedPromise.finally is not a function',
  command: 'git commit -m :lipstick: update style -m ',
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false }

Error Message:

image

carloscuesta commented 4 years ago

Hey @gaoryrt

Thanks for reporting the issue,

Could you run the following command to see if that is the problem ?

git rev-parse --absolute-git-dir

Can't reproduce your error 😕

Screenshot 2020-01-10 at 10 15 33
carloscuesta commented 4 years ago

Also, now that I see that you're using node@8, minimum required version of node for this package is 10, so that could be the problem too.

https://github.com/carloscuesta/gitmoji-cli/blob/master/package.json#L6

gaoryrt commented 4 years ago

No more issue when I switch to node@10, so that's it. I use yarn --ignore-engines when I install gitmoji-cli globally to avoid warning, I think I should use --ignore-engines carefully. Thank you @carloscuesta .