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

Enhancement: add support for Node 12 #1668

Closed
ex1st opened this issue Apr 23, 2019 · 10 comments
Closed

Enhancement: add support for Node 12 #1668

ex1st opened this issue Apr 23, 2019 · 10 comments
Milestone

Comments

@ex1st
Copy link

ex1st commented Apr 23, 2019

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ubuntu/.nvm/versions/node/v12.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Linux 5.0.0-13-generic
gyp ERR! command "/home/ubuntu/.nvm/versions/node/v12.0.0/bin/node" "/home/ubuntu/.nvm/versions/node/v12.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/test/node_modules/sharp
gyp ERR! node -v v12.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.22.0 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.22.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@lovell
Copy link
Owner

lovell commented Apr 23, 2019

Yes, I see the same thing here. The first compilation failure is:

../src/common.h:80:20: error: ‘Handle’ is not a member of ‘v8’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                    ^~~~~~

It looks like the underlying version of V8 in Node 12 finally removed the deprecated v8::Handle, which I think was still required for the version of V8 used in the no-longer-supported Node 4.

Commit aa9b328 removes use of the deprecated API. This will be in v0.22.1.

@lovell lovell added this to the v0.22.1 milestone Apr 23, 2019
kaijchang added a commit to kaijchang/louis that referenced this issue Apr 24, 2019
@DIYgod
Copy link

DIYgod commented Apr 24, 2019

Thanks for your work, when will v0.22.1 be released?

@lovell
Copy link
Owner

lovell commented Apr 24, 2019

@DIYgod docker-library/official-images#5789 will allow Node 12 CI and therefore prebuilt binaries, which is worth waiting for.

@dhritzkiv
Copy link

Looks like Node 12 just got added as tags on the docker image. Strangely, there's no node:12; the most 'generic' is node:12.0 (note the 0 in the minor position)

@lovell
Copy link
Owner

lovell commented Apr 25, 2019

CI for Linux and OS X now passing with Node 12 - https://travis-ci.org/lovell/sharp/builds/524351959

CI for Windows is dependent on appveyor/ci#2921

@lovell lovell changed the title Sharp doesn't compile with Node v12 Enhancement: add support for Node 12 Apr 25, 2019
@nstepien
Copy link
Contributor

@lovell You don't have to wait for an AppVeyor update with Update-NodeJsInstallation
nstepien/iltorb@9a088c3
https://ci.appveyor.com/project/MayhemYDG/iltorb/builds/24079316/job/fmh7l7sm6ht5mdjf
This method will make your builds a bit slower, but it's worth it so you don't have to wait for AppVeyor updates.

@nstepien
Copy link
Contributor

@lovell Here's a PR for this: #1669

@lovell
Copy link
Owner

lovell commented Apr 25, 2019

Waiting for electron/node-abi#62 so we can build for ABI 72 (Node 12).

@lovell
Copy link
Owner

lovell commented Apr 25, 2019

v0.22.1 now available with support for Node 12.

@imkane
Copy link

imkane commented May 30, 2019

Updating to sharp 0.22.1 fixed this for me w/ Windows + Node 12, thanks!

Repository owner locked and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants