cypherix93 / Pokemon-GO-Scanner

(Abandoned) Map scanner for Pokemon GO to find wild pokemon, gyms, stops etc.
16 stars 5 forks source link

npm run serve-app #10

Closed vinsilsim closed 8 years ago

vinsilsim commented 8 years ago

Anyone know why this error?

pokemon-go-scanner@0.6.0 serve-app /root/Pokemon-GO-Scanner nodemon ./build/app/Server.js --watch ./build/app/

[nodemon] 1.10.0 [nodemon] to restart at any time, enter rs [nodemon] watching: /root/Pokemon-GO-Scanner/build/app/*/ [nodemon] starting node ./build/app/Server.js /root/Pokemon-GO-Scanner/build/app/core/cluster/PokeWorkerCluster.js:27 static getHeartbeatMapWithCoordinates(latitude, longitude, maxSteps = 8) { ^

SyntaxError: Unexpected token = at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/root/Pokemon-GO-Scanner/build/app/core/PokeScannerApplication.js:12:29) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) [nodemon] app crashed - waiting for file changes before starting...

cypherix93 commented 8 years ago

It's an ES6 feature. I guess you are using Node 4.x? Try running with the --harmony flag.

vinsilsim commented 8 years ago

@cypherix93 node v4.2.6

cypherix93 commented 8 years ago

Try running:

node ./build/app/Server.js --harmony

vinsilsim commented 8 years ago

root@Ubuntu-1604-xenial-64-minimal ~/Pokemon-GO-Scanner # node ./build/app/Server.js --harmony /root/Pokemon-GO-Scanner/build/app/core/cluster/PokeWorkerCluster.js:27 static getHeartbeatMapWithCoordinates(latitude, longitude, maxSteps = 8) { ^

SyntaxError: Unexpected token = at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/root/Pokemon-GO-Scanner/build/app/core/PokeScannerApplication.js:12:29) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)

cypherix93 commented 8 years ago

Ahh, sorry. That particular feature was shipped in Node 6.0.0. Check here.

Either upgrade to Node 6.x or change the particular method signature to:

getHeartbeatMapWithCoordinates(latitude, longitude, maxSteps)

vinsilsim commented 8 years ago

@cypherix93 thank you!

getHeartbeatMapWithCoordinates(latitude, longitude, maxSteps)

Work! which port the server run?

cypherix93 commented 8 years ago

Server: 32598

Client: 32600

Check here for details.

vinsilsim commented 8 years ago

@cypherix93 thanks http://138.201.153.236:32600/ Map dont open =/

cypherix93 commented 8 years ago

Is it working on localhost:32600? If it is, then make sure the cors configuration inside the server is set properly.

vinsilsim commented 8 years ago

which file I put google api key?

cypherix93 commented 8 years ago

Closing issue as the original issue was solved.

You don't need Google Maps key anymore. I switched the map to Leaflet.