Skip to content

Has no exported member 'Subscription' #77

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

Closed
jmchaves opened this issue May 12, 2018 · 15 comments
Closed

Has no exported member 'Subscription' #77

jmchaves opened this issue May 12, 2018 · 15 comments

Comments

@jmchaves
Copy link

jmchaves commented May 12, 2018

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
Copy link

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
Copy link

r-anwar commented May 13, 2018

@alaingmail
@Bloodcast69

Hi,
libraries should not ship there typescript code, please read following comment about this.
angular/angular-cli#8284 (comment)

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

best regards, R. Anwar

@alaingmail
Copy link

@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
Copy link
Author

jmchaves commented May 13, 2018

@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
Copy link
Contributor

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
Copy link

eglyte commented May 14, 2018

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
Copy link
Author

When will next release be ready?

@alaingmail
Copy link

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

@Bloodcast69
Copy link
Contributor

@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
Copy link

alaingmail commented May 15, 2018 via email

@Bloodcast69
Copy link
Contributor

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

@alaingmail
Copy link

alaingmail commented May 15, 2018 via email

@Bloodcast69
Copy link
Contributor

Bloodcast69 commented May 15, 2018 via email

@alaingmail
Copy link

alaingmail commented May 17, 2018 via email

@Bloodcast69
Copy link
Contributor

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

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

5 participants