Topic: MDB Angular pro – Error upon startup
Dor Sharon free asked 7 years ago
Hi, I just recently installed MDB Pro for Angular using the 5min quickstart guide.Now, after ng-serve i get this message:
ERROR in C:/Users/dor44/WebstormProjects/CoopWorld/node_modules/ng-mdb-pro/node_modules/@angular/router/upgrade/src/upgrade.d.ts (9,31): Cannot find module '@angular /upgrade/static'. ERROR in Error: Metadata version mismatch for module C:/Users/dor44/WebstormProjects/CoopWorld/node_modules/ng-mdb-pro/node_modules/@angular/core/core.d.ts, found ve rsion 4, expected 3, resolving symbol MDBRootModules in C:/Users/dor44/WebstormProjects/CoopWorld/node_modules/ng-mdb-pro/mdb.module.ts, resolving symbol MDBRootModu les in C:/Users/dor44/WebstormProjects/CoopWorld/node_modules/ng-mdb-pro/mdb.module.ts at syntaxError (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler\bundles\compiler.umd.js:1729:34) at simplifyInContext (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler\bundles\compiler.umd.js:24979:23) at StaticReflector.simplify (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler\bundles\compiler.umd.js:24991:13) at StaticReflector.annotations (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler\bundles\compiler.umd.js:24418:41) at _getNgModuleMetadata (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler-cli\src\ngtools_impl.js:138:31) at _extractLazyRoutesFromStaticModule (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler-cli\src\ngtools_impl.js:109:26) at C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler-cli\src\ngtools_impl.js:129:27 at Array.reduce (<anonymous>) at _extractLazyRoutesFromStaticModule (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler-cli\src\ngtools_impl.js:128:10) at Object.listLazyRoutesOfModule (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler-cli\src\ngtools_impl.js:53:22) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@angular\compiler-cli\src\ngtools_api.js:91:39) at AotPlugin._getLazyRoutesFromNgtools (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@ngtools\webpack\src\plugin.js:241:66) at _donePromise.Promise.resolve.then.then.then.then.then (C:\Users\dor44\WebstormProjects\CoopWorld\node_modules\@ngtools\webpack\src\plugin.js:495:24) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
I have Angular 4.4.6, Angular-CLI 1.6.2, Node 8.9.0
Damian Gemza staff answered 7 years ago
Dor Sharon free commented 7 years ago
I don't see any workaround specified there. Could you please guide me?Damian Gemza staff commented 7 years ago
Please configure your package.json like below: The key step is “@angular” – 5.0.0 – 5.1.2, and for CLI “1.5.0 – 1.6.2” Here is my modified package.json: “dependencies”: { …… “@angular/animations”: “5.0.0 – 5.1.2”, “@angular/common”: “5.0.0 – 5.1.2”, “@angular/compiler”: “5.0.0 – 5.1.2”, “@angular/core”: “5.0.0 – 5.1.2”, “@angular/forms”: “5.0.0 – 5.1.2”, “@angular/http”: “5.0.0 – 5.1.2”, “@angular/platform-browser”: “5.0.0 – 5.1.2”, “@angular/platform-browser-dynamic”: “5.0.0 – 5.1.2”, “@angular/router”: “5.0.0 – 5.1.2”, “@angular/service-worker”: “5.0.0 – 5.1.2”, ……. “devDependencies”: { “@angular/cli”: “1.5.0 – 1.6.2”, “@angular/compiler-cli”: “5.0.0 – 5.1.2”, “@angular/language-service”: “5.0.0 – 5.1.2”, ……Dor Sharon free commented 7 years ago
I get this error when changing my package.json like that: npm ERR! code ETARGET npm ERR! notarget No matching version found for @angular/animations@5.0.0 – 5.1.2 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. What am I doing wrong? <pre>package.json: ... “@angular/animations”: “5.0.0 – 5.1.2”, “@angular/common”: “5.0.0 – 5.1.2”, “@angular/compiler”: “5.0.0 – 5.1.2”, “@angular/core”: “5.0.0 – 5.1.2”, “@angular/forms”: “5.0.0 – 5.1.2”, “@angular/http”: “5.0.0 – 5.1.2”, ...</pre>Dawid Adach pro commented 7 years ago
Dear Dor, could you please zip your project (without node_modules folder, remove it before) and send it to d.gemza@mdbootstrap.com?Damian Gemza staff answered 7 years ago
Dor Sharon free commented 7 years ago
Hi, Just update to angular 5.1.2 and got the same error as here: https://mdbootstrap.com/support/mdb-angular-pro-startup-issue/ my package.json: "dependencies": { ... "@angular/animations": "5.1.2", "@angular/cdk": "5.0.3", "@angular/common": "5.1.2", "@angular/compiler": "5.1.2", "@angular/compiler-cli": "5.1.2", "@angular/core": "5.1.2", "@angular/forms": "5.1.2", "@angular/http": "5.1.2", "@angular/platform-browser": "5.1.2", "@angular/platform-browser-dynamic": "5.1.2", "@angular/router": "5.1.2", ...FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No