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

Spinner not spining #284

Open
adesombergh opened this issue Mar 21, 2024 · 4 comments
Open

Spinner not spining #284

adesombergh opened this issue Mar 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@adesombergh
Copy link

Environment

"consola": "^3.2.3"
Tested on node 20 and 18

Reproduction

Stackblitz reproduction here
Github repo here

Describe the bug

Following this exemple i expect consola to show a spinner while the promise resolve. However only a static ◐ character is visible.

Additional context

I don't know if it's related but the spinner function in /src/utils/prompt.ts is never called in the project.

Logs

No response

@Atinux Atinux added the bug Something isn't working label Mar 22, 2024
@zerosrat
Copy link

I search sipnner in the repo and find out sippner in src/utils/prompt.ts is never imported

@m0nch1
Copy link

m0nch1 commented Apr 17, 2024

I search sipnner in the repo and find out sippner in src/utils/prompt.ts is never imported

As mentioned above, I think that spinner is simply not used in the sample, although it is available as an implementation.
So I created a PR!

cc: @adesombergh @zerosrat

@adesombergh
Copy link
Author

Thank you @m0nch1 , however changing the examples does not fix the issue. Running consola.start(), await new Promise((resolve) => setTimeout(resolve, 1000));, consola.success() will still not show an animated spinner as expected.

@zerosrat
Copy link

zerosrat commented Apr 23, 2024

I think another way to address the use of spinner is to use other npm packages, such as ora+cli-spinners. That's what I'm doing now, using consola for the non-spinner parts and other npm packages for the spinner parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants