shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

TS2307: Cannot find module ngx-modialog/plugins/bootstrap #403

Closed celestale closed 7 years ago

celestale commented 7 years ago

angular app ng-version=4.4.4 typescript=2.5.3 ngx-modialog= "_id": "ngx-modialog@3.0.4" (installed with npm install ngx-modial)

First, I installed ngx-modialog with npm install ngx-modial, then went to app.module.ts to imports as shown in Quick Start. Is there any steps i missed out? The at-loader is complaining about this error, appreciate your help guys!

import { ModalModule } from 'ngx-modialog';
import { BootstrapModalModule } from 'ngx-modialog/plugins/bootstrap';

Error:

[at-loader] Checking finished with 1 errors
[at-loader] ./src/app/app.module.ts:67:38
    TS2307: Cannot find module 'ngx-modialog/plugins/bootstrap'.
celestale commented 7 years ago

UPDATE: I also tried to create an empty angular project using angular-cli with the same error.

achimha commented 7 years ago

Try going back to TypeScript 2.5.1.

wgsl2005 commented 7 years ago

@celestale did rolling back to 2.5.1 solve the issue? I had the same issue. I would appreciate if you can confirm.

wgsl2005 commented 7 years ago

Just tried. rolling back to 2.5.2 didn't work for me. Any idea why?

celestale commented 7 years ago

@wgsl2005 Rolling back to 2.5.1 fixed this issue. But there is no styling on the model. @achimha I think I have to npm install bootstrap in order to see bootstrap theme?

UPDATE: installing bootstrap does not fixed the CSS. Currently, the model is opened at relative x: 0, y:0 position. Nothing like the demo shown with plunker

UPDATE 2: Found a fix here. We just need to configure some stuffs in angular-cli.json after npm install bootstrap

wgsl2005 commented 7 years ago

@celestale thank you sir. it turned out I had a wrong reference path - stupid me!. But I did have the no styling issue and installing and adding the bootstrap css solved the issue.