Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program breaks while using gitmoji -c #324

Closed
yogeshvar opened this issue Mar 9, 2020 · 8 comments
Closed

Program breaks while using gitmoji -c #324

yogeshvar opened this issue Mar 9, 2020 · 8 comments
Labels

Comments

@yogeshvar
Copy link

Hello @carloscuesta!

Issue:
Exit 1 while using gitmoji -c
Please find the attachment given below.

    at e.value (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/fuse.js/dist/fuse.js:9:3409)
    at new e (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/fuse.js/dist/fuse.js:9:2634)
    at filterGitmojis (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/lib/utils/filterGitmojis.js:24:16)
    at Object.source (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/lib/commands/commit/prompts.js:27:56)
    at AutocompletePrompt.search (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/inquirer-autocomplete-prompt/index.js:177:32)
    at AutocompletePrompt._run (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/inquirer-autocomplete-prompt/index.js:65:10)
    at /Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/inquirer/lib/prompts/base.js:57:12
    at new Promise (<anonymous>)
    at AutocompletePrompt.run (/Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/inquirer/lib/prompts/base.js:56:12)
    at /Users/mags/.nvm/versions/node/v12.13.1/lib/node_modules/gitmoji-cli/node_modules/inquirer/lib/ui/prompt.js:98:27

OS:
gitmoji-cli -v: 3.2.1
Node version: v12.13.1

Error Message:

image

@P-Jeremy
Copy link

P-Jeremy commented Mar 9, 2020

Same behavior here

Gitmoji Version: 3.2.1
Node Version : v13.8.0

Error Message:

image

@gustavopch
Copy link

Same behavior.

Gitmoji: both v3.2.0 and v3.2.1.
Node: both v10.19.0 and v12.16.1.

Error: Total of weights cannot exceed 1
    at e.value (/usr/local/lib/node_modules/gitmoji-cli/node_modules/fuse.js/dist/fuse.js:9:3409)
    at new e (/usr/local/lib/node_modules/gitmoji-cli/node_modules/fuse.js/dist/fuse.js:9:2634)
    at filterGitmojis (/usr/local/lib/node_modules/gitmoji-cli/lib/utils/filterGitmojis.js:24:16)
    at Object.source (/usr/local/lib/node_modules/gitmoji-cli/lib/commands/commit/prompts.js:27:56)
    at AutocompletePrompt.search (/usr/local/lib/node_modules/gitmoji-cli/node_modules/inquirer-autocomplete-prompt/index.js:177:32)
    at AutocompletePrompt._run (/usr/local/lib/node_modules/gitmoji-cli/node_modules/inquirer-autocomplete-prompt/index.js:65:10)
    at /usr/local/lib/node_modules/gitmoji-cli/node_modules/inquirer/lib/prompts/base.js:57:12
    at new Promise (<anonymous>)
    at AutocompletePrompt.run (/usr/local/lib/node_modules/gitmoji-cli/node_modules/inquirer/lib/prompts/base.js:56:12)
    at /usr/local/lib/node_modules/gitmoji-cli/node_modules/inquirer/lib/ui/prompt.js:98:27

Probably not related, but I started to have this issue after replacing https://github.com/nvm-sh/nvm with http://npm.im/n.

Gitmoji v3.1.0 works fine tho.

@carloscuesta
Copy link
Owner

This must be related by #303 @adriencaccia. I'll try to take a look at this

@yupswing
Copy link

I'm experiencing the same behavior:

❯ gitmoji -v
3.2.1
❯ node -v
v13.9.0

(note: I'm using nodenv)

Error with -c, -i or -s; -l is fine, probably because there is no search.

❯ gitmoji -s bug
query bug
Error: Total of weights cannot exceed 1
    at e.value (/home/yupswing/.nodenv/versions/13.9.0/lib/node_modules/gitmoji-cli/node_modules/fuse.js/dist/fuse.js:9:3409)

@ghost
Copy link

ghost commented Mar 10, 2020

Same happens to me, ill try to find something in the commit @carloscuesta mentioned

@ghost
Copy link

ghost commented Mar 10, 2020

Same happens to me, ill try to find something in the commit @carloscuesta mentioned

I tried gitmoji 3.2.0, gives the same error. 3.1.0 is fine, so the error has to be from PR #267
Idk if im right, im new to this

@ghost
Copy link

ghost commented Mar 10, 2020

I think i almost got it, when the error prompts in cmd, we can see this 2 lines:

    at filterGitmojis (/home/andres/.nvm/versions/node/v12.16.1/lib/node_modules/gitmoji-cli/lib/utils/filterGitmojis.js:24:16)
    at Object.source (/home/andres/.nvm/versions/node/v12.16.1/lib/node_modules/gitmoji-cli/lib/commands/commit/prompts.js:27:56)

So the error might be coming from filterGitmojis.js, or prompts.js.
I think it can be the filterGitmojis file, beacause it was added when 3.2.0 released
But dont trust me, im novice at this.

@carloscuesta
Copy link
Owner

Fixed at 3.2.2

Thanks 🎉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants