-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Element type is invalid #15
Comments
@mkilpatrick not sure if it's still relevant, but I faced the same issue today. I'm using commmonJS and was able to work around this issue the following way: const { default: Spinner } = require("ink-spinner"); Have a good one 👋 |
@mkilpatrick Hey bro, did you solve this problem? |
For the record, I had the same issue (and with ink-text-input too). I solved it this way (even in TS) import SpinnerCJS from 'ink-spinner';
import TextInputCJS from 'ink-text-input';
// @ts-expect-error -- issue with ink-text-input and CommonJS definition
const TextInput = TextInputCJS.default as typeof TextInputCJS;
// @ts-expect-error -- issue with ink-text-input and CommonJS definition
const Spinner = SpinnerCJS.default as typeof SpinnerCJS; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I import this library and use it exactly the same way as the example I get
However, if I copy the src into my own project, along with this fix, it works fine.
The text was updated successfully, but these errors were encountered: