-
Notifications
You must be signed in to change notification settings - Fork 97
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
Cannot import since update to version 6.0.0 #87
Comments
Version 6 is an api change. let me know how it goes |
Thank you for your help. For the time being I will stick to the previous version.
|
Sounds good. If you can look into why those errors are happening, that would be helpful. |
The export is now named instead of default so instead of import AnsiUp from 'ansi_up'; you need to use import {AnsiUp} from 'ansi_up'; I have just migrated a project to v6 with this change. In case it still does not work, it might be because your toolchain is not ESM-compatible, you can try these suggestions. |
Hi @drudru, The issue appears to be in the "types": "./dist/ansi_up.d.ts" Because of this, when trying to import import { AnsiUp } from 'ansi_up'; The following error is produced:
@Farbfetzen: Two temporary Workarounds that worked for me:
// @ts-ignore
import { AnsiUp } from 'ansi_up';
"types": "./ansi_up.d.ts" |
@ollischlueter - ah - will update this in 6.0.2. Thank you! |
Hello, I am using ansi_up in an Angular app and today I wanted to update to version 6.0.0. But after the update I get this error:
I am importing it like this:
import AnsiUp from 'ansi_up';
which has worked fine until now. I don't exactly understand what went wrong here. Somehow it tries to import the .js file instead of the .ts file. Is there a different way I could try to import it?The text was updated successfully, but these errors were encountered: