Closed leonardoespinosa closed 6 years ago
El Error se presenta por que en el paquete de servidor de produccion, el modulo de agm/core se mantiene con ES6 y genera conflicto. Para resolver el problema se usaron scripts de babel que permiten hacer la transcompilacion del codigo a commonjs, haciendo que sea compatible con los demas modulos.
El problema se presenta al intentar hacer uso de la libreria @agm/core. Cuando se adiciona el modulo en el app.module.ts se presenta el siguiente error:
SharedModule.forRoot(), Ng2PageScrollModule.forRoot(), NgxPaginationModule, ChartModule, BrowserAnimationsModule, MdNativeDateModule, AgmCoreModule.forRoot({ apiKey: 'AIzaSyBXJSlwWRSHoRiZdqlOfHPqxxDRdqm8_Jk' })
Error presentado:
modules.js:192901 Uncaught SyntaxError: Unexpected token export es5-shim.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at es5-shim.js:17 at es5-shim.js:2788 promise.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at promise.js:17 at promise.js:581 babel-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at babel-runtime.js:17 at babel-runtime.js:159 ecmascript-runtime-client.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at ecmascript-runtime-client.js:17 at ecmascript-runtime-client.js:176 random.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at random.js:18 at random.js:367 mongo-id.js:19 Uncaught TypeError: Cannot read property 'Random' of undefined at mongo-id.js:19 at mongo-id.js:142 geojson-utils.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at geojson-utils.js:17 at geojson-utils.js:438 minimongo.js:23 Uncaught TypeError: Cannot read property 'MongoID' of undefined at minimongo.js:23 at minimongo.js:3961 check.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at check.js:17 at check.js:582 retry.js:18 Uncaught TypeError: Cannot read property 'Random' of undefined at retry.js:18 at retry.js:110 ddp-common.js:17 Uncaught TypeError: Cannot read property 'check' of undefined at ddp-common.js:17 at ddp-common.js:493 reload.js:18 Uncaught TypeError: Cannot read property 'Symbol' of undefined at reload.js:18 at reload.js:309 ddp-client.js:17 Uncaught TypeError: Cannot read property 'check' of undefined at ddp-client.js:17 at ddp-client.js:5107 ddp.js:14 Uncaught TypeError: Cannot read property 'DDP' of undefined at ddp.js:14 at ddp.js:27 allow-deny.js:18 Uncaught TypeError: Cannot read property 'LocalCollection' of undefined at allow-deny.js:18 at allow-deny.js:552 mongo.js:17 Uncaught TypeError: Cannot read property 'AllowDeny' of undefined at mongo.js:17 at mongo.js:863 jquery.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at jquery.js:17 at jquery.js:10420 localstorage.js:17 Uncaught TypeError: Cannot read property 'Random' of undefined at localstorage.js:17 at localstorage.js:83 observe-sequence.js:19 Uncaught TypeError: Cannot read property 'MongoID' of undefined at observe-sequence.js:19 at observe-sequence.js:407 blaze.js:17 Uncaught TypeError: Cannot read property '$' of undefined at blaze.js:17 at blaze.js:3898 accounts-base.js:20 Uncaught TypeError: Cannot read property 'Random' of undefined at accounts-base.js:20 at accounts-base.js:1374 srp.js:17 Uncaught TypeError: Cannot read property 'Random' of undefined at srp.js:17 at srp.js:1445 accounts-password.js:17 Uncaught TypeError: Cannot read property 'Accounts' of undefined at accounts-password.js:17 at accounts-password.js:315 spacebars.js:17 Uncaught TypeError: Cannot read property 'ObserveSequence' of undefined at spacebars.js:17 at spacebars.js:335 templating-runtime.js:18 Uncaught TypeError: Cannot read property 'Blaze' of undefined at templating-runtime.js:18 at templating-runtime.js:256 templating.js:14 Uncaught TypeError: Cannot read property 'Template' of undefined at templating.js:14 at templating.js:27 reactive-dict.js:21 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at reactive-dict.js:21 at reactive-dict.js:331 session.js:18 Uncaught TypeError: Cannot read property 'ReactiveDict' of undefined at session.js:18 at session.js:98 meteortoys_toykit.js:17 Uncaught TypeError: Cannot read property 'Template' of undefined at meteortoys_toykit.js:17 at meteortoys_toykit.js:468 msavin_mongol.js:17 Uncaught TypeError: Cannot read property 'Template' of undefined at msavin_mongol.js:17 at msavin_mongol.js:1892 matb33_collection-hooks.js:17 Uncaught TypeError: Cannot read property 'Mongo' of undefined at matb33_collection-hooks.js:17 at matb33_collection-hooks.js:876 jalik_ufs.js:17 Uncaught TypeError: Cannot read property 'check' of undefined at jalik_ufs.js:17 at jalik_ufs.js:3010 jalik_ufs-gridfs.js:18 Uncaught TypeError: Cannot read property 'Mongo' of undefined at jalik_ufs-gridfs.js:18 at jalik_ufs-gridfs.js:178 service-configuration.js:17 Uncaught TypeError: Cannot read property 'Accounts' of undefined at service-configuration.js:17 at service-configuration.js:77 oauth.js:17 Uncaught TypeError: Cannot read property 'check' of undefined at oauth.js:17 at oauth.js:402 accounts-oauth.js:18 Uncaught TypeError: Cannot read property 'Random' of undefined at accounts-oauth.js:18 at accounts-oauth.js:188 accounts-ui-unstyled.js:19 Uncaught TypeError: Cannot read property 'ServiceConfiguration' of undefined at accounts-ui-unstyled.js:19 at accounts-ui-unstyled.js:2107 twitter-oauth.js:17 Uncaught TypeError: Cannot read property 'OAuth' of undefined at twitter-oauth.js:17 at twitter-oauth.js:130 http.js:19 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at http.js:19 at http.js:326 accounts-twitter.js:17 Uncaught TypeError: Cannot read property 'Accounts' of undefined at accounts-twitter.js:17 at accounts-twitter.js:97 google-oauth.js:17 Uncaught TypeError: Cannot read property 'OAuth' of undefined at google-oauth.js:17 at google-oauth.js:168 accounts-google.js:18 Uncaught TypeError: Cannot read property 'Random' of undefined at accounts-google.js:18 at accounts-google.js:123 vsivsi_job-collection.js:18 Uncaught TypeError: Cannot read property 'Mongo' of undefined at vsivsi_job-collection.js:18 at vsivsi_job-collection.js:3870 facebook-oauth.js:17 Uncaught TypeError: Cannot read property 'OAuth' of undefined at facebook-oauth.js:17 at facebook-oauth.js:99 btafel_accounts-facebook-cordova.js:17 Uncaught TypeError: Cannot read property 'Accounts' of undefined at btafel_accounts-facebook-cordova.js:17 at btafel_accounts-facebook-cordova.js:121 webapp.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at webapp.js:18 at webapp.js:63 livedata.js:14 Uncaught TypeError: Cannot read property 'DDP' of undefined at livedata.js:14 at livedata.js:31 autoupdate.js:19 Uncaught TypeError: Cannot read property 'Retry' of undefined at autoupdate.js:19 at autoupdate.js:206 barbatus_typescript-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined at barbatus_typescript-runtime.js:17 at barbatus_typescript-runtime.js:321 global-imports.js:3 Uncaught TypeError: Cannot read property 'Mongo' of undefined at global-imports.js:3 app.js:1 Uncaught ReferenceError: meteorInstall is not defined at app.js:1