Armax / Pokemon-GO-node-api

Pokemon GO api node.js library
MIT License
875 stars 198 forks source link

maybe beginner's mistake #269

Open DestroyerIV opened 5 years ago

DestroyerIV commented 5 years ago

Hi, the API is failing me when I set the PokeGo.init method (prop, function (err) {/ ...}).

I set the variables correctly, check them a few times, and the console shows me the following error:

/mnt/c/Users/x-user/Desktop/x-proyect/node_modules/pokemon-go-node-api/poke.io.js:841
        var _data$results$0$geome = data.results[0].geometry.location;

TypeError: Cannot read property 'geometry' of undefined
    at /mnt/c/Users/x-user/Desktop/x-proyect/node_modules/pokemon-go-node-api/poke.io.js:841:53

when checking the line number, I see that it shows a '}'

https://github.com/Armax/Pokemon-GO-node-api/blob/9d10b9403fb1fe5f2db234357ba9cdc2957370ed/poke.io.js#L841

DestroyerIV commented 5 years ago

Looking deeper I realized where the error was:

{ error_message: 'You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account',
  results: [],
  status: 'REQUEST_DENIED' }

Any help?