Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token . in Electron #848

Open
chriship opened this issue May 24, 2024 · 2 comments
Open

Uncaught SyntaxError: Unexpected token . in Electron #848

chriship opened this issue May 24, 2024 · 2 comments
Labels
needs more info This issue needs more information from the customer to proceed. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chriship
Copy link

I have a Vue app which I am bundling using Electron into a Windows exe.

For a number of years the following code has worked. Recently is has stopped with an Unexpected token error when calling this.loader.load()

Note, this code works when I run it in the browser. It does not work when I run it using Electron (both using electron:serve and electron:build).

I've upaded to "@googlemaps/js-api-loader": "^1.16.6" and still the same. Previously I was using "^1.12.1".

Does anyone have an ideas how I can get it working again?

this.loader = new Loader({
      apiKey: "...",
      version: "weekly",
      libraries: ["places"]
    });

    this.mapOptions = {
      mapId: "54a1eec626be752c",
      disableDefaultUI: true,
      zoom: this.ZOOM,
      zoomControl: true,
      center: this.CENTER,
      backgroundColor: '#9bbff4'
    };

    this.loader.load().then((google) => {
      
        this.google = google
        this.map = new google.maps.Map(document.getElementById("map"), this.mapOptions);
        this.geocoder = new google.maps.Geocoder();

    })
@chriship chriship added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 24, 2024
@wangela
Copy link
Member

wangela commented May 24, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@chriship Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@usefulthink
Copy link
Contributor

Which electron version are you using?
Can you provide some more details about the error-message?

@usefulthink usefulthink added needs more info This issue needs more information from the customer to proceed. and removed triage me I really want to be triaged. labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue needs more information from the customer to proceed. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants