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

Support for Node.js 12.0.0 #1410

Closed
negezor opened this issue Apr 24, 2019 · 15 comments
Closed

Support for Node.js 12.0.0 #1410

negezor opened this issue Apr 24, 2019 · 15 comments

Comments

@negezor
Copy link

negezor commented Apr 24, 2019

Issue or Feature

I wanted to install canvas on version 12 of Node.js

Steps to Reproduce

yarn add canvas

Error: The module '/opt/printer/node_modules/canvas/build/Release/canvas.node'
NODE_MODULE_VERSION 67. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas):
    2.4.1
  • Environment (e.g. node 4.2.0 on Mac OS X 10.8):
    Node.js 12.0.0 on Debian GNU/Linux buster/sid x86_64
@chearon
Copy link
Collaborator

chearon commented Apr 25, 2019

@LinusU now that #1409 is merged shall we release a new version with 12 prebuilds?

@asturur
Copy link
Contributor

asturur commented Apr 27, 2019

I'm trying to build it normally, but i get this error:

make: Entering directory `/home/travis/build/fabricjs/fabric.js/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/backend/Backend.o
  CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o
../src/backend/ImageBackend.cc: In static member function ‘static void ImageBackend::Initialize(v8::Local<v8::Object>)’:
../src/backend/ImageBackend.cc:67:83: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
  target->Set(Nan::New<String>("ImageBackend").ToLocalChecked(), ctor->GetFunction());
                                                                                   ^
../src/backend/ImageBackend.cc:67:83: note: candidate is:
In file included from /home/travis/.node-gyp/12.0.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:53,
                 from ../src/backend/Backend.h:6,
                 from ../src/backend/ImageBackend.h:3,
                 from ../src/backend/ImageBackend.cc:1:
/home/travis/.node-gyp/12.0.0/include/node/v8.h:5947:46: note: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                              ^
/home/travis/.node-gyp/12.0.0/include/node/v8.h:5947:46: note:   candidate expects 1 argument, 0 provided
make: *** [Release/obj.target/canvas/src/backend/ImageBackend.o] Error 1
make: Leaving directory `/home/travis/build/fabricjs/fabric.js/node_modules/canvas/build'

unsure if is a missing library or there is an incompatibility.

@asturur
Copy link
Contributor

asturur commented Apr 27, 2019

oh i see, i need latest master.

@asturur
Copy link
Contributor

asturur commented Apr 28, 2019

Any chance to get a new release with node12 support?

Zirro added a commit to Zirro/jsdom that referenced this issue Apr 29, 2019
Zirro added a commit to Zirro/jsdom that referenced this issue Apr 30, 2019
@LinusU
Copy link
Collaborator

LinusU commented May 1, 2019

Sorry, been away traveling, getting a release ready now!

@asturur
Copy link
Contributor

asturur commented May 1, 2019 via email

@LinusU
Copy link
Collaborator

LinusU commented May 1, 2019

2.5.0 have been released under the next tag 🚀

@LinusU LinusU closed this as completed May 1, 2019
@asturur
Copy link
Contributor

asturur commented May 2, 2019

just a note that since i upgraded to node12 and canvas 2.5.0 my visual tests in fabricjs started to fail, 27 failures. I did not have time to inspect the visuals yet, but something happened.
I'll let you know if what is going on

@chearon
Copy link
Collaborator

chearon commented May 7, 2019

@LinusU I uploaded the binaries yesterday, sorry for the wait. No Windows builds for node 12 yet since AppVeyor has to update their whole image and I can't get their suggested solution to work.

@LinusU
Copy link
Collaborator

LinusU commented May 7, 2019

No worries at all! I saw the release in that repo and bumped the tag earlier today ☺️

Thanks for taking care of it ❤️ if you want me to help out with it, feel free to open an issue describing how to trigger a build (or maybe this is already documented somewhere?) and then maybe I can try doing the next one 🙌

@asturur
Copy link
Contributor

asturur commented May 7, 2019

regarding my comment node 12 and latest nodecanvas works good on my laptop, fail tests under travis. Whatever version of node i use, travis fails to make tests pass with nodecanvas 2.5.0 but not with the previous release.

@chearon
Copy link
Collaborator

chearon commented May 7, 2019

It's all documented here, thanks for the help!

@asturur not sure about that, assuming you're doing image diffing could it be the detail loss changes you made in 39aa8ab? I don't see anything else that looks suspect.

@asturur
Copy link
Contributor

asturur commented May 7, 2019

but locally on mac works.
Tests that fails are of various kind, text, Image, svgs.

I cannot pull out artifacts from travis or i would try to see. do you know how to do?

@zbjornson
Copy link
Collaborator

@asturur you can run a debug build on Travis (allows SSH into the VM and thus rsync/whatever you want) per https://docs.travis-ci.com/user/running-build-in-debug-mode/.

@LinusU
Copy link
Collaborator

LinusU commented May 8, 2019

It's all documented here, thanks for the help!

Ah, the wiki of course 😁 I only looked in the repo, thanks!

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

5 participants