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

Cannot build s2geometry-node #64

Closed
adrianpanicek opened this issue Jul 21, 2016 · 21 comments
Closed

Cannot build s2geometry-node #64

adrianpanicek opened this issue Jul 21, 2016 · 21 comments

Comments

@adrianpanicek
Copy link

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

..\geometry\s1interval.cc(249): error C2065: 'M_PI': undeclared identifier [C:\
nodejs\poke\node_modules\s2geometry-node\build\NativeExtension.vcxproj

I'm pasting a npm-debug.log

npm-debug.txt

npm -v 3.10.5

node -v v4.4.7

@SzymonLisowiec
Copy link
Contributor

sudo apt-get install build-essential
npm install -g pokemon-go-node-api

This working for me.

@LASkuma
Copy link
Contributor

LASkuma commented Jul 21, 2016

The build-essential doesn't work for me. It's already installed and still cannot pass s2geometry-node build.

@kfernandes29
Copy link

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

@cypherix93
Copy link
Contributor

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.

@vekexasia
Copy link

I've some issues with "isnan has not been declared"

@FabioAntunes
Copy link

FabioAntunes commented Jul 22, 2016

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

@vekexasia
Copy link

@FabioAntunes try with

sudo npm install -g nan

Youi'll have nan but it won't compile either way

@FabioAntunes
Copy link

@vekexasia thanks for the tip, that doesn't work but I tried npm install nan to install it locally and it did compile

@vekexasia
Copy link

shit. which linux are you on?

@FabioAntunes
Copy link

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

@vekexasia
Copy link

i'm on 16.04 and it just don't work :(

@FabioAntunes
Copy link

@vekexasia you are not the only one, @LASkuma had the same problem d-pollard/Pokemon-GO-node-api@526d671#commitcomment-18350298

@billyriantono
Copy link
Collaborator

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

@kfernandes29
Copy link

Can I build it on my Mac for a windows machine?

@Luzifix
Copy link

Luzifix commented Jul 22, 2016

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

@FunkeDope
Copy link

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...

@billyriantono
Copy link
Collaborator

@Luzifix have you try npm install s2geometry-node ?

@Luzifix
Copy link

Luzifix commented Jul 22, 2016

@billyriantono Same error :(
i install build-essential but this not really help.

@Armax Armax closed this as completed Jul 23, 2016
@Luzifix
Copy link

Luzifix commented Jul 23, 2016

After reinstall node & npm on linux it works fine :)

@IHFF12
Copy link

IHFF12 commented Jul 23, 2016

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.

@coolaj86
Copy link
Contributor

Fixed in #165 by using pure JavaScript - no C++ or compiler necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests