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

Can't manage to install on OSX #77

Closed
waissbluth opened this issue Apr 26, 2015 · 6 comments
Closed

Can't manage to install on OSX #77

waissbluth opened this issue Apr 26, 2015 · 6 comments

Comments

@waissbluth
Copy link

Hello, I'm trying to install on OSX Yosemite and I can't seem to get around this. Any help is appreciated!

It looks like a problem with canvas, but npm install -g canvasruns fine.

Thanks

nwr$ npm install
\
> canvas@1.0.4 install /Users/nwr/Downloads/nodetiles-core-master/node_modules/canvas
> node-gyp rebuild

  CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../src/Canvas.cc:7:
In file included from ../src/Canvas.h:22:
../src/nan.h:105:5: error: no member named 'ThrowException' in namespace 'v8'
    THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nan.h:101:11: note: expanded from macro 'THROW_ERROR'
      v8::ThrowException(fun(v8::String::New(errmsg)));                        \
      ~~~~^
../src/nan.h:105:5: error: no member named 'New' in 'v8::String'
    THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nan.h:101:42: note: expanded from macro 'THROW_ERROR'
      v8::ThrowException(fun(v8::String::New(errmsg)));                        \
                             ~~~~~~~~~~~~^
../src/nan.h:110:9: error: no type named 'ThrowException' in namespace 'v8'
    v8::ThrowException(error);
    ~~~~^
../src/nan.h:114:5: error: no member named 'ThrowException' in namespace 'v8'
    THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nan.h:101:11: note: expanded from macro 'THROW_ERROR'
      v8::ThrowException(fun(v8::String::New(errmsg)));                        \
      ~~~~^
../src/nan.h:114:5: error: no member named 'New' in 'v8::String'
    THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nan.h:101:42: note: expanded from macro 'THROW_ERROR'
      v8::ThrowException(fun(v8::String::New(errmsg)));                        \
                             ~~~~~~~~~~~~^
../src/nan.h:118:5: error: no member named 'ThrowException' in namespace 'v8'
    THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nan.h:101:11: note: expanded from macro 'THROW_ERROR'
      v8::ThrowException(fun(v8::String::New(errmsg)));                        \
      ~~~~^
../src/nan.h:118:5: error: no member named 'New' in 'v8::String'
    THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nan.h:101:42: note: expanded from macro 'THROW_ERROR'
      v8::ThrowException(fun(v8::String::New(errmsg)));                        \
                             ~~~~~~~~~~~~^
../src/nan.h:122:12: error: no member named 'Dispose' in
      'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    handle.Dispose(nan_isolate);
    ~~~~~~ ^
../src/nan.h:229:48: error: too few arguments to function call, single argument
      'isolate' was not specified
   v8::Local<v8::Object> obj = v8::Object::New();
                               ~~~~~~~~~~~~~~~ ^
/Users/nwr/.node-gyp/0.12.2/deps/v8/include/v8.h:2388:3: note: 'New' declared
      here
  static Local<Object> New(Isolate* isolate);
  ^
In file included from ../src/Canvas.cc:7:
In file included from ../src/Canvas.h:22:
../src/nan.h:230:13: error: no member named 'NewSymbol' in 'v8::String'; did you
      mean 'IsSymbol'?
   obj->Set(NanSymbol("callback"), fn);
            ^~~~~~~~~~~~~~~~~~~~~
../src/nan.h:30:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^
/Users/nwr/.node-gyp/0.12.2/deps/v8/include/v8.h:1379:8: note: 'IsSymbol'
      declared here
  bool IsSymbol() const;
       ^
In file included from ../src/Canvas.cc:7:
In file included from ../src/Canvas.h:22:
../src/nan.h:230:13: error: call to non-static member function without an object
      argument
   obj->Set(NanSymbol("callback"), fn);
            ^~~~~~~~~~~~~~~~~~~~~
../src/nan.h:30:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^~~~~~~~~
../src/nan.h:236:11: error: no member named 'Dispose' in
      'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
   handle.Dispose();
   ~~~~~~ ^
../src/nan.h:252:12: error: no member named 'NewSymbol' in 'v8::String'; did you
      mean 'IsSymbol'?
       Get(NanSymbol("callback")).As<v8::Function>();
           ^~~~~~~~~~~~~~~~~~~~~
../src/nan.h:30:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^
/Users/nwr/.node-gyp/0.12.2/deps/v8/include/v8.h:1379:8: note: 'IsSymbol'
      declared here
  bool IsSymbol() const;
       ^
In file included from ../src/Canvas.cc:7:
In file included from ../src/Canvas.h:22:
../src/nan.h:252:12: error: call to non-static member function without an object
      argument
       Get(NanSymbol("callback")).As<v8::Function>();
           ^~~~~~~~~~~~~~~~~~~~~
../src/nan.h:30:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^~~~~~~~~
../src/nan.h:252:50: error: expected '(' for function-style cast or type
      construction
       Get(NanSymbol("callback")).As<v8::Function>();
                                     ~~~~~~~~~~~~^
../src/nan.h:252:52: error: expected expression
       Get(NanSymbol("callback")).As<v8::Function>();
                                                   ^
../src/nan.h:254:32: error: no member named 'GetCurrent' in 'v8::Context'
   callback->Call(v8::Context::GetCurrent()->Global(), argc, argv);
                  ~~~~~~~~~~~~~^
../src/nan.h:291:3: error: unknown type name 'uv_work_t'
  uv_work_t request;
  ^
../src/nan.h:300:17: error: no member named 'NewSymbol' in 'v8::String'; did you
      mean 'IsSymbol'?
    handle->Set(NanSymbol(key), obj);
                ^~~~~~~~~~~~~~
../src/nan.h:30:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^
/Users/nwr/.node-gyp/0.12.2/deps/v8/include/v8.h:1379:8: note: 'IsSymbol'
      declared here
  bool IsSymbol() const;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/nwr/Downloads/nodetiles-core-master/node_modules/canvas
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! canvas@1.0.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.0.4 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the canvas 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 their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/nwr/Downloads/nodetiles-core-master/npm-debug.log
Mr0grog added a commit that referenced this issue Apr 26, 2015
…OK, as I believe canvas generally follows semver. Fixes #77.
@Mr0grog
Copy link
Member

Mr0grog commented Apr 26, 2015

Oof, sorry about this. Looks like our Canvas dependency is just way out of date :(

There’s a patch in #78 (the 77-canvas-out-of-date branch) that should work. Can you give that a try and let me know if it works for you? Just npm install nodetiles-core@nodetiles/nodetiles-core#77-canvas-out-of-date.

@waissbluth
Copy link
Author

Hey @Mr0grog, thanks your your help. Unfortunately it's unable to find a working version for canvas@'^1.0 for some reason

However, I got it to work using this commit

nwr$ npm install nodetiles-core@nodetiles/nodetiles-core#77-canvas-out-of-date
npm WARN package.json nodetiles-server-example@0.0.1 No repository field.
npm http GET https://registry.npmjs.org/nodetiles-core
npm http 200 https://registry.npmjs.org/nodetiles-core
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/proj4js
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/proj4js-defs
npm http GET https://registry.npmjs.org/carto
npm http GET https://github.com/yuletide/node-shp/tarball/master
npm http 200 https://registry.npmjs.org/proj4js-defs
npm http 200 https://registry.npmjs.org/lodash
npm http 200 https://registry.npmjs.org/proj4js
npm http 200 https://registry.npmjs.org/async
npm http 200 https://registry.npmjs.org/canvas
npm ERR! Error: No compatible version found: canvas@'^1.0'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.1.0","0.2.0","0.2.1","0.3.0","0.3.1","0.3.2","0.3.3","0.4.0","0.4.1","0.4.2","0.4.3","0.5.0","0.5.1","0.5.2","0.5.3","0.5.4","0.6.0","0.7.0","0.7.1","0.7.2","0.7.3","0.8.0","0.8.1","0.8.2","0.8.3","0.9.0","0.10.0","0.10.1","0.10.2","0.10.3","0.11.0","0.11.1","0.11.2","0.11.3","0.12.0","0.12.1","0.13.0","0.13.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.2.0","1.2.1","1.2.2"]
npm ERR!     at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:719:10)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/cache.js:641:10
npm ERR!     at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:302:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 14.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "nodetiles-core@nodetiles/nodetiles-core#77-canvas-out-of-date"
npm ERR! cwd /Users/nwr/Downloads/nodetiles-init-master
npm ERR! node -v v0.8.28
npm ERR! npm -v 1.2.30
npm http 200 https://github.com/yuletide/node-shp/tarball/master
npm http 200 https://registry.npmjs.org/carto
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/nwr/Downloads/nodetiles-init-master/npm-debug.log
npm ERR! not ok code 0

@Mr0grog
Copy link
Member

Mr0grog commented Apr 26, 2015

@waissbluth it looks like you switched back to Node 0.8 from 0.12. The “^” operator for versioning that I used only works from 0.10 onward :\

Did you mean to switch to 0.8? Should I rewrite it so it’s compatible with that?

@Mr0grog
Copy link
Member

Mr0grog commented Apr 26, 2015

I just switched it to use the old syntax, so you should be able to run the same command again and, hopefully, it should work for you:

npm install nodetiles-core@nodetiles/nodetiles-core#77-canvas-out-of-date

@waissbluth
Copy link
Author

Ha, it worked! Thanks. It was not my intention to switch back to 0.8; that was just me trying everything I could.

Thank you very much

@Mr0grog
Copy link
Member

Mr0grog commented Apr 26, 2015

No problem. My fault for not keeping this stuff up-to-date.

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

2 participants