Hi MDB-ng-pro team,
I want to install mdb-ng-pro via npm and I followed up the instructions in Getting Stared -"5min quick start" - PRO, got following error: No NgModule metadata found for 'AppModule'
-----------------------LOG Detail----------------------------
ERROR in Error: No NgModule metadata found for 'AppModule'.
at NgModuleResolver.resolve (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@angular/compiler/bundles/compiler.umd.js:20276:23)
at CompileMetadataResolver.getNgModuleMetadata (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@angular/compiler/bundles/compiler.umd.js:15229:60)
at visitLazyRoute (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@angular/compiler/bundles/compiler.umd.js:31090:104)
at AotCompiler.listLazyRoutes (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@angular/compiler/bundles/compiler.umd.js:31058:20)
at AngularCompilerProgram.listLazyRoutes (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@angular/compiler-cli/src/transformers/program.js:156:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@angular/compiler-cli/src/ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:248:66)
at Promise.resolve.then.then (/Users/michaelhe/mydev/mdbpro-ng5app/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:562:50)
at process._tickCallback (internal/process/next_tick.js:109:7)
webpack: Failed to compile.
-----------------------------------------------------
Below are my environment info:
$ npm -v
3.10.10
$ node -v
v6.10.3
$ ng -v
_ _ ____ _ ___
/ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ | '_ / _` | | | | |/ _` | '__| | | | | | |
/ ___ | | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ __| |_|__, |__,_|_|__,_|_| ____|_____|___|
|___/
Angular CLI: 1.6.2
Node: 6.10.3
OS: darwin 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.2
@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.2
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0
"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",
"core-js": "^2.4.1",
"ng-mdb-pro": "git+https://oauth2:xxxxxxxxxxxxxxxxx@git.mdbootstrap.com/mdb/angular/ng-pro.git",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14",
"chart.js": "^2.5.0",
"easy-pie-chart": "^2.1.7",
"hammerjs": "^2.0.8",
"screenfull": "3.3.0",
"font-awesome": "^4.7.0"
},
"devDependencies": {
"@angular/cli": "^1.6.2",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
By the way, manual installation is working well. I think it should be my environment issue.
Please kindly help to check and share your valuable comments, let me know in case of more required information.
Thanks & Regards,
Michael
Hello there,
Yesterday, we've put an update of MDB for support Angular 5.1.2 and CLI 1.6.2. Please update your's depedencies in package.json and delete your's node_modules.
For
"@angular" - 5.0.0 - 5.1.2, and for CLI "1.5.0 - 1.6.2"
In example:
“@angular/animations”: “5.0.0 - 5.1.2”,
After that please type npm i one more time.
If this solution doesn't work, please read issue case from link below. There some people got same problem, and some solution should works.
https://github.com/angular/angular-cli/issues/8798
Let me know about problem.
Best Regards,
Damian