question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular Google Maps (@agm/core) - Unexpected token export

See original GitHub issue

Getting 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:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
EricSimonscommented, Oct 26, 2017

@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!!

1reaction
EricSimonscommented, Oct 24, 2017

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.ts

Lmk if that works for ya or if you run into any other troubles!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found