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

export 'ModalOptions' was not found in 'ng2-bootstrap' #1590

Closed
kambbado opened this issue Feb 1, 2017 · 7 comments
Closed

export 'ModalOptions' was not found in 'ng2-bootstrap' #1590

kambbado opened this issue Feb 1, 2017 · 7 comments

Comments

@kambbado
Copy link

kambbado commented Feb 1, 2017

I'm using ng2-bootstrap 1.3.2 and I'm noticing this issue now, it was not happening with the previous version. Do you have an hints?

WARNING in ./src/app/shared/dialogs/popup.component.ts
184:50-62 "export 'ModalOptions' was not found in 'ng2-bootstrap'

This is my import line in my component

import { ModalDirective, ModalOptions } from 'ng2-bootstrap';

Update: updated to ng2-bootstrap@1.4.0-beta.3 and the issue went away

Thank you

@valorkin
Copy link
Member

valorkin commented Feb 2, 2017

I will include in next version fix for it,
I had to switch from export * to named exports
and seems I have lost couple of classes to export

@valorkin
Copy link
Member

valorkin commented Feb 3, 2017

please try v1.3.3

@kambbado
Copy link
Author

kambbado commented Feb 4, 2017

I tried the 1.3.3, what is strange is that when I run "ng serve --aot" no warnings are given, but when I removed the "--aot" parameters it outputs the following error

184:82-94 "export 'ModalOptions' was not found in 'ng2-bootstrap'

I'm using Visual Studio 2015 as the editor and it's complaining on this line

import { ModalDirective, ModalOptions } from 'ng2-bootstrap';

that

ng2-bootstraap/index.d.ts is not a module.

I have uninstall and re-installed ng2-bootstrap

Here's my tsconfig.json file
`{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es6", "dom" ],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}

I install ng2-bootstrap@1.4.0-beta.3 and I'm no longer receiving the warning.

I'm stumped, is it my development environment configuration? Let me know if you need more information or would like me to change something at my end. Anything to help.

Manny
`

@valorkin
Copy link
Member

valorkin commented Feb 4, 2017

Angular cli versions?
Ts version?
Try to import ng2bs/modals

@kambbado
Copy link
Author

kambbado commented Feb 4, 2017

tsc -v
Version 2.0.3
ng -v
angular-cli: 1.0.0-beta.28.3
node: 7.5.0
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5

Tried to import ng2-bootstrap/modal, produced the same warning

@valorkin
Copy link
Member

valorkin commented Feb 4, 2017

Try ts v2.0.10 and @angular/cli .30

@valorkin
Copy link
Member

valorkin commented Feb 4, 2017

If it will not work, join slack and drop me a link to Repo in DM

@valorkin valorkin reopened this Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants