Angular Google Maps (@agm/core) - Unexpected token export
See original GitHub issueGetting the following error when testing simple example from https://angular-maps.com/guides/getting-started/ :
Unexpected token export
Evaluating https://unpkg.com/@agm/core@1.0.0-beta.1/index.js
Can test here: https://angular-google-maps-example.stackblitz.io
Could this be related to #131 ? Although I’m not using AngularFire2 in the above example.
Could possibly be related to SebastianM/angular-google-maps#1052 even though this is a more Angular Universal issue…
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
angular 2 : @agm\core\index.js:2 - Unexpected token export
I have solved the maps issue and got my autocomplete in my web project. Please inclue "angular2-google-maps": "^0.16.0" in your package.json ...
Read more >angular-ui/angular-google-maps - Gitter
I am having an issue with unexpected token export when using import { AgmCoreModule } from '@agm/core'; with an Angular 8 app-shell build....
Read more >Unexpected token export for JEST & AGM module-angular.js
Coding example for the question Unexpected token export for JEST & AGM ... private listenGMAPSearch(): void { const autocomplete = new google.maps.places.
Read more >nx jest unexpected token 'export' - You.com | The AI Search ...
This means, that a file is not transformed through TypeScript compiler, e.g. because it is a JS file with TS syntax, or it...
Read more >changelog - @agm/core
update to angular 9/10 and @types/googlemaps (7982bfb) ... LazyMapsApiLoader: Change OpaqueToken to InjectionToken (f1163fd); snazzy-info-window: fix ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Alucardz yup you’re totally right about this — I think I’ve figured out a way to fix this from happening 😃 I’ve got it running locally right now but need to do some more testing before I send it to prod, shooting to have it on prod tmrw 😅 So sorry about the inconvenience!!
Hey @Alucardz! So sorry about my delay here, the past week or so has been nuts 😅 It looks like this is actually a problem with the package itself — specifically it doesn’t have a main field that points to its CJS bundle. Instead, if you import
import { AgmCoreModule } from '@agm/core/core.umd';
(core.umd.js is the main bundle) everything works great! Here’s a fork of your project that’s working properly: https://stackblitz.com/edit/angular-google-maps-example-9neueh?file=app%2Fapp.module.tsLmk if that works for ya or if you run into any other troubles!