Topic: [Pro User] No exported member

Vitor Pavanelli free asked 6 years ago


Hi, I on index.ts file, under node_modules/ng-mdb-pro, the error below Error:(2, 9) TS2305: Module '"../node_modules/ng-mdb-pro/free/index"' has no exported member 'MDBSpinningPreloader'. I also see Error:(4, 10) TS2305: Module '"../node_modules/ng-mdb-pro/free/index"' has no exported member 'MDBBootstrapModulePro'. These the only errors I see for exported modules. Please, can you take a look? Thank you, Vitor

Damian Gemza staff answered 6 years ago


Hello Vitor, it's a known issue for us. Unfortunately,  this problem isn't caused by our product, but by Angular. It's Angular's problem. We have described this cause in our FAQ for Angular - feel free to take a deep look on our FAQ :)  https://mdbootstrap.com/angular/faq/ We will put your's suggestion to next release of MDB Angular, so the problem will be fixed in few next weeks :) I'm closing this topic cause everything for you is known. Best Regards, Damian

Vitor Pavanelli free answered 6 years ago


Hi Damian, Please, make this change to your repository. It will solve the issues of compatibility. Make this default in your product. This is caused by a mismatch in certain versions of angular versioning tool. Workaround: Change
import { MDBBootstrapModulePro } from './pro/';
to
import { MDBBootstrapModulePro } from './pro/index';
in ng-mdb-pro/mdb.modules.ts It works fine now. Thank you, Vitor

Vitor Pavanelli free answered 6 years ago


Hi Damian, I saw an email saying that your new release is compatible with Angular 5.1.3 and CLI 1.6.3. I ran a quick test and I do see this is not true. The same issue is still happening. ERROR in node_modules/ng-mdb-pro/index.ts(2,9): error TS2305: Module '"../node_modules/ng-mdb-pro/free/index"' has no exported member 'MDBSpinningPreloader'. node_modules/ng-mdb-pro/mdb.module.ts(4,10): error TS2305: Module '"../node_modules/ng-mdb-pro/free/index"' has no exported member 'MDBBootstrapModulePro'. node_modules/ng-mdb-pro/mdb.module.ts(11,3): error TS2305: Module '"../node_modules/ng-mdb-pro/free/index"' has no exported member 'MDBBootstrapModulePro'. Can you guys explain this, please? Thank you, Vitor

DanielNetzer free answered 6 years ago


when did you released a new version? because I have tried using angular 5.1.2 with 1.6.2 on angular/cli and still experienced severe issues.

I'm using an old commit at the moment with TS 2.7.0 and 1.6.3 cli.

 

{
"name": "cupo.io",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.9",
"@ngrx/effects": "4.1.1",
"@ngrx/entity": "4.1.1",
"@ngrx/router-store": "4.1.1",
"@ngrx/store": "4.1.1",
"@ngrx/store-devtools": "4.1.1",
"chart.js": "^2.5.0",
"core-js": "^2.4.1",
"crypto-js": "^3.1.9-1",
"easy-pie-chart": "^2.1.7",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"ng-mdb-pro": "git+https://***********@git.mdbootstrap.com/mdb/angular/ng-pro.git#0ef0caed",
"ngrx-store-freeze": "^0.2.0",
"ngrx-store-localstorage": "^0.3.0",
"ngx-device-detector": "^1.1.4",
"rxjs": "^5.5.6",
"screenfull": "^3.3.2",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "^1.6.3",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/google.analytics": "0.0.36",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.5.7",
"codelyzer": "^4.0.2",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.3",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.2.2",
"ts-node": "~4.1.0",
"tslint": "~5.8.0",
"typescript": "^2.7.0-dev.20180105"
}
}

Damian Gemza staff commented 6 years ago

Daniel, We've put update on thursday. In your package.json you could set versions of all @angular dependencies to 5.0.0 - 5.1.2, and IT should works for now. In monday we will fix this. Best Regards, Damian

Vitor Pavanelli free answered 6 years ago


Hi Damian, The workaround provided here "https://mdbootstrap.com/support/mdb-angular-pro-startup-issue/" also doens't work. I apologize for being insistent on this but this is actually delaying my projects and I have a delivery commitment. Thank you, Vitor

Damian Gemza staff commented 6 years ago

Im sorry but for now, i havent got other workaround that's could help you.

DanielNetzer free commented 6 years ago

experiencing the same issue, broke production ready.

DanielNetzer free commented 6 years ago

had to use the commit from past week till this problem is resolved.

Dawid Adach pro commented 6 years ago

Dear DanielNetzer, we have found the issue within CLI apparently CLI have some issue when there is a mismatch with Angular version within main project and mdb itself. We have released MDB tested against 5.1.2 but recently (3rd Jan) there were new Angular 5.1.3 released. As a result, if your project is using 5.1.3 version and MDB try to install 5.1.2 inside node modules there will be an issue. We have already tested 5.1.3 and commited to git repository so now it should work fine (please make sure to remove old mdb pro from node modules and re install it, after installaion check if there is no node_modules folder under /root/node_modules/ng-mdb-pro/ . We have created an issue to Angular team: https://github.com/angular/angular-cli/issues/9103#issuecomment-355566110

Vitor Pavanelli free answered 6 years ago


cool! thank you very much! Please, let me know when you have a working version!! Best regards, Vitor

Damian Gemza staff commented 6 years ago

We will inform everyone when fix will be developed ;)

Vitor Pavanelli free answered 6 years ago


Hi Damian, This issue won't be fixed until the first one is fixed. It works fine for me when using Angular 5.0.0. It doesn't work for specification below: Angular CLI: 1.6.3 Node: 8.9.3 OS: win32 x64 Angular: 5.1.3 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router @angular/cli: 1.6.3 @angular-devkit/build-optimizer: 0.0.36 @angular-devkit/core: 0.0.22 @angular-devkit/schematics: 0.0.42 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.9.3 @schematics/angular: 0.1.11 @schematics/schematics: 0.0.11 typescript: 2.6.2 webpack: 3.10.0 Thank you, Vitor

Damian Gemza staff commented 6 years ago

We know about this problem. We're working to fix this.

Damian Gemza staff answered 6 years ago


Dear Vitor, for second issue please read post from this link. IT should help you. https://mdbootstrap.com/support/mdb-angular-pro-startup-issue/ Best Regards, Damian

Damian Gemza staff answered 6 years ago


Dear Vitor, for second issue please read post from this link. IT should help you. https://mdbootstrap.com/support/mdb-angular-pro-startup-issue/ Best Regards, Damian

Damian Gemza staff answered 6 years ago


Hello Vitor, Could you provide me more code? Please paste here your's node_modules/ng-mdb-pro/free/index.ts code. Without it I can't help you. Best Regards, Damian

Vitor Pavanelli free commented 6 years ago

Hi Damian, I only used the "npm install" command provided: "npm install git+https://oauth2:@git.mdbootstrap.com/mdb/angular/ng-pro.git --save". Steps: - Use the command above to install MDBoostrap Pro; - Navigate "node_modules/ng-mdb-pro"; - Open "mdb.module.ts", then the IDE will highlight "MDBBootstrapModulePro"as red and it will display an error message saying: Error:(4, 10) TS2305: Module ‘”../node_modules/ng-mdb-pro/free/index”‘ has no exported member ‘MDBBootstrapModulePro’. - Open "index.ts", then IDE will highlight "MDBSpinningPreloader" as red and it will display the error: Error:(2, 9) TS2305: Module ‘”../node_modules/ng-mdb-pro/free/index”‘ has no exported member ‘MDBSpinningPreloader’. You can use Visual Studio Code or another IDE you use to see that. I also found out that I am unable to use Angular 5.1.3 because there is this error on this module. Please, I need a solution on this. Create a project using "ng new test-project",  replace package.json content with the one below, do the MDBoostrap Pro configuration and run "ng build". You will get "ERROR in Error: No NgModule metadata found for 'AppModule'". { "name": "test-project", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^5.1.3", "@angular/common": "^5.1.3", "@angular/compiler": "^5.1.3", "@angular/core": "^5.1.3", "@angular/forms": "^5.1.3", "@angular/http": "^5.1.3", "@angular/platform-browser": "^5.1.3", "@angular/platform-browser-dynamic": "^5.1.3", "@angular/router": "^5.1.3", "core-js": "^2.5.3", "ng-mdb-pro": "git+https://oauth2:<your key>@git.mdbootstrap.com/mdb/angular/ng-pro.git", "rxjs": "^5.5.6", "zone.js": "^0.8.19", "chart.js": "^2.7.1", "easy-pie-chart": "^2.1.7", "hammerjs": "^2.0.8", "screenfull": "3.3.2", "font-awesome": "^4.7.0" }, "devDependencies": { "@angular/cli": "1.6.3", "@angular/compiler-cli": "^5.1.3", "@angular/language-service": "^5.1.3", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.5.7", "codelyzer": "^4.0.2", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.3.3", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.2.2", "ts-node": "~4.1.0", "tslint": "~5.8.0", "typescript": "~2.6.2" } } Thank you, Vitor

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags