Topic: MDB-Angular Admin Dashboard 5.0.0 – not building
Rostislav pro asked 7 years ago
I have got an error duaring "ng build" MDB Angular Dashboard 5.0.0
ERROR in node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.d.ts(1,10): error TS2305: Module '"D:/tmp
ng-admin-pro/node_modules/@angular/core/core"' has no exported member 'OpaqueToken'.
Also i have notice that root package.json has reference @angular to 5.x although package.json in src/app/typescripts/pro has dependency to @angular 4.3. I also supposed that it has version of mdb is 4.x but not 5
Please correct this package
Damian Gemza staff answered 6 years ago
Benny Bottema pro answered 6 years ago
I ran into the same issue for 5.0.5 and I updated the agm dependency in package.json to 1.0.0-beta.2.
So: "dependencies": { "@agm/core": "1.0.0-beta.2", ... }
This solved it for me. Althought running "npm i" again didn't work for me for some unknown reason (had to remove node_modules completely first).
Sebastian Kaczmarek staff answered 7 years ago
OpaqueToken
to InjectionToken<any>
in the localization specified in the error message.
node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.d.ts:
export declare const LAZY_MAPS_API_CONFIG: InjectionToken; // Instead of OpaqueTokenand node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.js:
export var LAZY_MAPS_API_CONFIG = new InjectionToken('angular-google-maps LAZY_MAPS_API_CONFIG'); // Instead of OpaqueTokenAccording to your second issue, thanks for noticing. It's just our oversight in versioning. We will fix that. Best regards, Sebastian
Benny Bottema pro commented 6 years ago
This is happening to 5.0.5 as well.Benny Bottema pro commented 6 years ago
Actually it's very bad to edit node modules as a work around. > Since AGM module is a third-party dependency we have no influence on its Angular support. I'm sorry, but what? You develop this library against specific versions of dependencies (in this case agm@1.0.0-beta.0), so it either works or it doesn't when you release it. The only way it can break *after* you released this is if AGM unpublished their version in NPM and replaced it with a different one. Unless you meant something else, then I have no idea.Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No