jwashke / toast-ui-image-editor-angular-wrapper

A simple Angular6+ wrapper for TOAST UI Image Editor
9 stars 20 forks source link

Can't add module to Ionic 4 project #1

Open jahertor opened 5 years ago

jahertor commented 5 years ago

I follow the instructions to get it working on Ionic 4 but with no success:

import { ToastUiImageEditorModule } from "toast-ui-image-editor";

Failed to compile.

./src/app/app.module.ts Module not found: Error: Can't resolve 'toast-ui-image-editor' in 'path-to-project'

UAjinkya commented 5 years ago

I follow the instructions to get it working on Ionic 4 but with no success:

import { ToastUiImageEditorModule } from "toast-ui-image-editor";

Failed to compile. ./src/app/app.module.ts Module not found: Error: Can't resolve 'toast-ui-image-editor' in 'path-to-project'

You have to import import { ToastUiImageEditorModule } from 'ngx-tui-image-editor';

arimus commented 5 years ago

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.

https://github.com/nhn/tui.image-editor/issues/219

arimus commented 5 years ago

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.