Closed adrianpanicek closed 8 years ago
sudo apt-get install build-essential
npm install -g pokemon-go-node-api
This working for me.
The build-essential doesn't work for me. It's already installed and still cannot pass s2geometry-node build.
I still can't figure this out either. In the mean time, what I did was
npm install --save pokemon-go-node-api@1.2.2
It's an issue on Windows machines. @billyriantono said he would look for a fix. Right now we are kinda stumped on Windows.
Meanwhile, try booting up a linux VM and see if it npm installs.
I've some issues with "isnan has not been declared"
I'm on linux and I'm getting this:
module.js:327
throw err;
^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at [eval]:1:1
at Object.exports.runInThisContext (vm.js:54:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:409:26)
at node.js:579:27
at nextTickCallbackWith0Args (node.js:420:9)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/fabio/.nvm/versions/node/v4.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.19.0-65-generic
gyp ERR! command "/home/fabio/.nvm/versions/node/v4.4.0/bin/node" "/home/fabio/.nvm/versions/node/v4.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/fabio/playground/gomap/node_modules/s2geometry-node
gyp ERR! node -v v4.4.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
I have also tested with node 5.9.1 and 6.3.1
@FabioAntunes try with
sudo npm install -g nan
Youi'll have nan but it won't compile either way
@vekexasia thanks for the tip, that doesn't work but I tried npm install nan
to install it locally and it did compile
shit. which linux are you on?
Elementary OS, basically it's ubuntu 14.04 the weird thing is yesterday I tried this repo on this machine and everything worked fine. Then I created a new folder for a fresh project and suddenly it didn't compile anymore
i'm on 16.04 and it just don't work :(
@vekexasia you are not the only one, @LASkuma had the same problem https://github.com/d-pollard/Pokemon-GO-node-api/commit/526d671084d996837cd3dc06ece1be5e790636cf#commitcomment-18350298
Sorry for the nan problem ... i have removed from package.json but i am miss in one file have been updated in s2geometry-node@1.2.2
Can I build it on my Mac for a windows machine?
i have to problems with s2geometery.
console: http://pastebin.com/Xvu53Ts1 npm-log: http://pastebin.com/MShX1K4T System: Ubuntu 14.04 Node: 6.3.0 NPM: 3.8.8
I couldn't get it to build on Ubuntu 16.04 on my Chromebook, but it did build okay on a 15.04 VM I have on my desktop...
@Luzifix have you try npm install s2geometry-node ?
@billyriantono Same error :( i install build-essential but this not really help.
After reinstall node & npm on linux it works fine :)
In my case, the problem was Windows. I have Visual Studio 2016, so that could be part of the issue.
I made a Virtual Box for Ubuntu and I got the API running in under 10 minutes. I highly recommend using Virtual Box for developing anyway. Linux is the best!
Edit: I run Ubuntu 16.0. I didn't have to install build-essential.
Fixed in https://github.com/Armax/Pokemon-GO-node-api/pull/165 by using pure JavaScript - no C++ or compiler necessary.
I've tried many times and many tips over the internet to build s2geometry using node-gyp but each time it fails on errors like
I'm pasting a npm-debug.log
npm-debug.txt
npm -v 3.10.5
node -v v4.4.7