mdbootstrap / mdb-angular-ui-kit

Angular 18 & Bootstrap 5 & Material Design UI KIT
https://mdbootstrap.com/docs/angular/
Other
1.12k stars 280 forks source link

Has no exported member 'Subscription' #77

Closed jmchaves closed 6 years ago

jmchaves commented 6 years ago

Expected behavior

Run ng serve successfully.

Actual behavior

I'm getting an error with a module.

Your working environment and MDB version information

Angular: 6.0.1 angular-bootstrap-md: 6.0.2 Bootstrap: 4.1.1 Angular CLI: 6.0.1 Node: 10.0.0 NPM: 6.0.1 OS: linux x64 rxjs: 6.1.0 typescript: 2.7.2 webpack: 4.3.0

Resources (screenshots, code snippets etc.)

screenshot from 2018-05-11 23-09-01

ERROR in node_modules/angular-bootstrap-md/dropdown/dropdown-toggle.directive.ts(2,10): error TS2305: Module '"/my-path/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/angular-bootstrap-md/dropdown/dropdown.directive.ts(3,12): error TS2305: Module '"/my-path/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/angular-bootstrap-md/dropdown/dropdown.directive.ts(158,9): error TS2339: Property 'filter' does not exist on type 'EventEmitter<boolean>'.

For every question of technical nature, in order to get the most detailed answer as soon as possible, ask on our dedicated Support Forum

alaingmail commented 6 years ago

Hi,

Are you missing the step where you add the following line into tsconfig.json? "include": ["node_modules/angular-bootstrap-md/**/*.ts", "src/**/*.ts"]

The error disappears for me after this line is added, but I then get: No NgModule metadata found for 'AppModule'

I think that's because I'm running angular v6.0.1 (like yourself) and the documentation states support for 5.0.0 - 6.0.0-rc.5.

Alain

r-anwar commented 6 years ago

@alaingmail @Bloodcast69

Hi, libraries should not ship there typescript code, please read following comment about this. https://github.com/angular/angular-cli/issues/8284#issuecomment-341417325

May you can update your packaging code, so that your library contains the js code?

best regards, R. Anwar

alaingmail commented 6 years ago

@r-anwar,

I don't follow what you're trying to say in regards to shipping typescript code. I get the error: No NgModule metadata found for 'AppModule' after "ng serve".

Alain

jmchaves commented 6 years ago

@alaingmail, I already added that code line in my tsconfig.json, and I got the same issue with the node_modules.

Also, I deleted the node_modules folder and installed everything again, but it didn't work.

Bloodcast69 commented 6 years ago

Dear @jmchaves Please try to do npm install rxjs-compat@^6.0.0. This problem will be fixed with next release. Dear @r-anwar With next release of MDB Angular, we'll ship source files in .js format! But thanks for your's report.

Best Regards, Damian

eglyte commented 6 years ago

for me helped $ npm install rxjs-compat and changing tsconfig.json

"include": [
    "src/**/*.ts",
    "node_modules/ng-mdb-pro/**/*.ts"
  ]

please add comment in 'quickstart' because it's not quickstart when after all steps code not compiles and you need to search support what happens. Not nice finding that you need to install compat package to make things work

jmchaves commented 6 years ago

When will next release be ready?

alaingmail commented 6 years ago

I'm still getting the same error No NgModule metadata found for 'AppModule' even after installing rxjs-compat@^6.0.0.

Bloodcast69 commented 6 years ago

@alaingmail please try the solution from @eglyte . @jmchaves 6.1.0 update will be released in next Monday (21.05.2018). @eglyte rxjs-compat problem will be fixed in 6.1.0 release. Also this include line in tsconfig.json won't be necessary after 6.1.0.

alaingmail commented 6 years ago

The solution given by Egle seems to be related to using the pro version. I'm using the free version.

On Tue, May 15, 2018 at 3:36 PM, Bloodcast69 notifications@github.com wrote:

@alaingmail https://github.com/alaingmail please try the solution from @eglyte https://github.com/eglyte . @jmchaves https://github.com/jmchaves 6.1.0 update will be released in next Monday (21.05.2018). @eglyte https://github.com/eglyte rxjs-compat problem will be fixed in 6.1.0 release. Also this include line in tsconfig.json won't be necessary after 6.1.0.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design/issues/77#issuecomment-389048394, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgthhBRQiHIfmO_jOwjDkVOBAXyR2Naks5tymlxgaJpZM4T8QRt .

Bloodcast69 commented 6 years ago

@alaingmail so instead of 'ng-mdb-pro' add 'angular-bootstrap-md'.

alaingmail commented 6 years ago

I already did that. It's part of the instructions.

On Tue, May 15, 2018 at 6:51 PM, Bloodcast69 notifications@github.com wrote:

@alaingmail https://github.com/alaingmail so instead of 'ng-mdb-pro' add 'angular-bootstrap-md'.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design/issues/77#issuecomment-389093047, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgthu23lvUFiIWRQLuwsT3yzq4qNyl3ks5typcbgaJpZM4T8QRt .

Bloodcast69 commented 6 years ago

Change order of src with angular-bootstrap-md. Probably that's the case.

wt., 15 maj 2018 o 11:09 alaingmail notifications@github.com napisał(a):

I already did that. It's part of the instructions.

On Tue, May 15, 2018 at 6:51 PM, Bloodcast69 notifications@github.com wrote:

@alaingmail https://github.com/alaingmail so instead of 'ng-mdb-pro' add 'angular-bootstrap-md'.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design/issues/77#issuecomment-389093047 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AKgthu23lvUFiIWRQLuwsT3yzq4qNyl3ks5typcbgaJpZM4T8QRt

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design/issues/77#issuecomment-389098278, or mute the thread https://github.com/notifications/unsubscribe-auth/AYjuxJC32LqeJa9Nlecey1UH7EUiDxGRks5typtegaJpZM4T8QRt .

alaingmail commented 6 years ago

All good now. Swapping the order of the include entries worked for me:

"include": [ "src/*/.ts", "node_modules/angular-bootstrap-md/*/.ts" ]

On Tue, May 15, 2018 at 7:10 PM, Bloodcast69 notifications@github.com wrote:

Change order of src with angular-bootstrap-md. Probably that's the case.

wt., 15 maj 2018 o 11:09 alaingmail notifications@github.com napisał(a):

I already did that. It's part of the instructions.

On Tue, May 15, 2018 at 6:51 PM, Bloodcast69 notifications@github.com wrote:

@alaingmail https://github.com/alaingmail so instead of 'ng-mdb-pro' add 'angular-bootstrap-md'.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/mdbootstrap/Angular-Bootstrap- with-Material-Design/issues/77#issuecomment-389093047 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ AKgthu23lvUFiIWRQLuwsT3yzq4qNyl3ks5typcbgaJpZM4T8QRt

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mdbootstrap/Angular-Bootstrap- with-Material-Design/issues/77#issuecomment-389098278, or mute the thread https://github.com/notifications/unsubscribe-auth/ AYjuxJC32LqeJa9Nlecey1UH7EUiDxGRks5typtegaJpZM4T8QRt

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design/issues/77#issuecomment-389098585, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgthhZJyxGKC3AXdi3XUCQxHi5YRBPUks5typudgaJpZM4T8QRt .

Bloodcast69 commented 6 years ago

Sounds good. Closing issue. If needed, feel free to open.