maierfelix / POGOserver

Pokemon GO server emulator
GNU General Public License v3.0
458 stars 197 forks source link

Is it possible to get this working on a mac #224

Open ghost opened 7 years ago

ghost commented 7 years ago

I was just wondering if it's possible to get this working on a mac because when I type npm install on my mac but I get this:

node-protobuf@1.3.3 install /Users/OCO0003/Desktop/POGOserver-master/node_modules/node-protobuf node-gyp rebuild

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select) gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Darwin 15.6.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/OCO0003/Desktop/POGOserver-master/node_modules/node-protobuf gyp ERR! node -v v6.6.0 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm WARN POGOServer@0.5.9 license should be a valid SPDX license expression npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v6.6.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE

npm ERR! node-protobuf@1.3.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-protobuf@1.3.3 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-protobuf package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-protobuf npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-protobuf npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/OCO0003/Desktop/POGOserver-master/npm-debug.log

and when I try npm run boot I get this:

POGOServer@0.5.9 boot /Users/OCO0003/Desktop/POGOserver-master npm run babel-node -- ./src/index.js

POGOServer@0.5.9 babel-node /Users/OCO0003/Desktop/POGOserver-master babel-node --presets=es2015 "./src/index.js"

module.js:457 throw err; ^

Error: Cannot find module 'pokemongo-protobuf' at Function.Module._resolveFilename (module.js:455:15) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (/Users/OCO0003/Desktop/POGOserver-master/src/index.js:5:1) at Module._compile (module.js:556:32) at loader (/Users/OCO0003/Desktop/POGOserver-master/node_modules/babel-register/lib/node.js:146:5) at Object.require.extensions.(anonymous function) as .js at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12)

npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "babel-node" "--" "./src/index.js" npm ERR! node v6.6.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE npm ERR! POGOServer@0.5.9 babel-node: babel-node --presets=es2015 "./src/index.js" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the POGOServer@0.5.9 babel-node script 'babel-node --presets=es2015 "./src/index.js"'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the POGOServer package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! babel-node --presets=es2015 "./src/index.js" npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs POGOServer npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls POGOServer npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/OCO0003/Desktop/POGOserver-master/npm-debug.log

npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "boot" npm ERR! node v6.6.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE npm ERR! POGOServer@0.5.9 boot: npm run babel-node -- ./src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the POGOServer@0.5.9 boot script 'npm run babel-node -- ./src/index.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the POGOServer package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run babel-node -- ./src/index.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs POGOServer npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls POGOServer npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/OCO0003/Desktop/POGOserver-master/npm-debug.log

So is it possible to get this working on mac If it isn't is there any alternative programs I could use to make a Pokemon go private server?

nliakm commented 7 years ago

you can install docker for mac and run the server with docker containers.

DracoMilesX commented 7 years ago

Their is a MacOs instlaation tutorial on the wiki. Have you tried that?

ghost commented 7 years ago

Their is a MacOs instlaation tutorial on the wiki. Have you tried that? Yes I have tried that got the same error :(

ghost commented 7 years ago

'you can install docker for mac and run the server with docker containers.' tried that didn't work either :/

nliakm commented 7 years ago

what didnt work exactly?

ghost commented 7 years ago

what didn't work exactly It gave me the same error when I got up to the npm bit :/

nliakm commented 7 years ago

hm okay. the cool thing about docker is, ones you set it up on one host, you can run the containers on every machine, no matter if its linux, mac or win. you just need docker installed. maybe i can give you my dockerfiles later. all you have to do is, to modify them a bit. the rest should go all by itself.

ghost commented 7 years ago

hm okay. the cool thing about docker is, ones you set it up on one host, you can run the containers on every machine, no matter if its linux, mac or win. you just need docker installed. maybe i can give you my dockerfiles later. all you have to do is, to modify them a bit. the rest should go all by itself.<

I looked in your repos and got the docker-compose.yml file and it worked So thank you!

DracoMilesX commented 7 years ago

@nliakm 1 thing I noticed is that you use a modified Dockerfile for the "old" one. Becold and I have been attempting to get it working with compose as well to lower the disk usage and "proper docker spirit" usage and changed to alpine to lower the size of the image needed from 3GB to 300MB/800MB (Excl/Incl mysql etc..).

https://github.com/DracoMilesX/POGOserver/blob/master/Dockerfile https://github.com/DracoMilesX/POGOserver

nliakm commented 7 years ago

@DracoMilesX Thats true. I had problems with alpine, so i switched back to the old file. but i'll take a look at your dockerfile. thank you!

Cronick commented 7 years ago

You need to install Xcode on your mac.

nliakm commented 7 years ago

@DracoMilesX ok i used your dockerfile. but i have a problem to get into my pogoserver terminal. the entrypoint.sh uses npm run boot to immediately run the server. but when i attach to the pogoserver, i dont know how to access the server terminal. i stop the server and run it again with npm run boot. than this comes up: [Console] Port 3000 is already in use! [Console] The server has crashed!

edit: hm the server seems to be online but i'm still confused about these "error messages"

DracoMilesX commented 7 years ago

@nliakm If you use docker-compose up you automatically get the terminal it's the same as the output terminal if I am not mistaken.

Might be that you already have pogo running on other docker container for the port error.

Will look into it again when I have time. The only issue I had was the mysql connection that I didn't get working.

nliakm commented 7 years ago

ok, what was your problem with mysql? maybe i can help you?

i solved my problem. i knew the server was running, but i didnt know how to attach to the running pogo server. when you run the container, it will be in detached mode by default. adding the -i flag (interactive mode) automatically opens the container terminal.

ghost commented 7 years ago

You need to install Xcode on your mac. I don't need to since I have docker :)

nliakm commented 7 years ago

@atomboy2005 i updated my repository and use the dockerfile from DracoMilesX, which reduces the image size of the pogoserver from ~3.3gb to ~1.3gb