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

''tui-image-editor'' has no default export. #3

Open
UAjinkya opened this issue Aug 29, 2019 · 4 comments
Open

''tui-image-editor'' has no default export. #3

UAjinkya opened this issue Aug 29, 2019 · 4 comments

Comments

@UAjinkya
Copy link

Hi
I have installed npm i ngx-tui-image-editor and also npm install --no-save --no-optional fabric@~1.6.7 as suggested in document.
imported
import { ToastUiImageEditorModule } from 'ngx-tui-image-editor'; in my app module
When trying to build solution getting following error.

ERROR in node_modules/ngx-tui-image-editor/lib/toast-ui-image-editor.component.d.ts(2,8): error TS1192: Module ''tui-image-editor'' has no default export.

@arimus
Copy link

arimus commented Sep 2, 2019

YMMV, but this is likely related to the way tui-image-editor is set up. If you use esModuleInterop / allowSyntheticDefaultImports: true in your tsconfig.json you may get past this issue. Warning though...this can create problems with other modules. Currently bootstrap popovers essentially hard lock the browser when using this flag. I think that this module would have to essentially bundle the tui-image-editor to get around the issue completely. Hopefully the tui-image-editor folks create a solution for us which does not involve esModuleInterop / allowSyntheticDefaultImports.

nhn/tui.image-editor#219

@arimus
Copy link

arimus commented Sep 3, 2019

FYI, it seems that allowSyntheticDefaultImports in a simple base app works just fine, even with bootstrap popovers. There must be something else in my stack (ngx-admin is a base project I'm using atm) that's unhappy once webpack does all it's magic and causes the lockups.

@yuricamara
Copy link

I put allowSyntheticDefaultImports: true in tsconfig.json and I had another error:

ERROR in ./node_modules/tui-image-editor/dist/tui-image-editor.js
Module not found: Error: Can't resolve 'fabric' in 'C:\Users\yurim\Documents\Repos\Lab\toastui-image-editor-ionic\node_modules\tui-image-editor\dist'

@yuricamara
Copy link

The error above disappeared with

npm install --no-save --no-optional fabric@~1.6.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants