node-gfx / node-canvas-prebuilt

Repo used to build binaries for node-canvas on CI
170 stars 31 forks source link

Update to Node 11 #62

Closed kachar closed 6 years ago

kachar commented 6 years ago

Following the upgrade of Node to 11 it seems the NODE_MODULE_VERSION has been changed from 64 to 67 and the prebuilt package is not found in the tarball list anymore:

canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz

$ node-pre-gyp install
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.10.3
node-pre-gyp info using node@11.0.0 | linux | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for ".../node_modules/resemblejs/node_modules/canvas-prebuilt/canvas/build/Release/canvas-prebuilt.node" (not found)
node-pre-gyp http GET https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.11/canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz
node-pre-gyp http 404 https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.11/canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.11/canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz
node-pre-gyp ERR! stack     at Request.<anonymous> (.../node_modules/node-pre-gyp/lib/install.js:137:27)
node-pre-gyp ERR! stack     at Request.emit (events.js:187:15)
node-pre-gyp ERR! stack     at Request.onRequestResponse (.../node_modules/request/request.js:1062:10)
node-pre-gyp ERR! stack     at ClientRequest.emit (events.js:182:13)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:562:21)
node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
node-pre-gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:449:20)
node-pre-gyp ERR! stack     at TLSSocket.emit (events.js:182:13)
node-pre-gyp ERR! stack     at addChunk (_stream_readable.js:283:12)
node-pre-gyp ERR! stack     at readableAddChunk (_stream_readable.js:264:11)
node-pre-gyp ERR! System Linux 3.16.0-4-amd64
node-pre-gyp ERR! command "/usr/local/bin/node" ".../node_modules/node-pre-gyp/bin/node-pre-gyp" "install"
node-pre-gyp ERR! cwd .../node_modules/resemblejs/node_modules/canvas-prebuilt
node-pre-gyp ERR! node -v v11.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
404 status code downloading tarball https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.11/canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz
molant commented 6 years ago

@chearon anything I can do to help with this?

chearon commented 6 years ago

You can add it here if you want, I'll try to be fast but currently I'm using CI for the librsvg builds

chearon commented 6 years ago

Update: the node 11 releases are live for macOS and Linux, after spending a while debugging a strange GitHub API error. For some reason AppVeyor isn't finding node 11, so Windows builds are still pending.

Edit: going to wait on appveyor/ci#2707 since I can't node versions that aren't included in the image to work

molant commented 6 years ago

@chearon can you please start a new build? node-sass is already using it

chearon commented 6 years ago

I tried yesterday. According to https://github.com/appveyor/ci/issues/2707#issuecomment-437183191 it's coming soon.

chearon commented 6 years ago

AppVeyor finally deployed Node 11. Just released

Node 11 / Windows x64 / 2.1.0 Node 11 / Windows x64 / 2.0.1 Node 11 / Windows x64 / 2.0.0

completing this issue 🎉

FezVrasta commented 5 years ago

Hey guys, what's the version where this change was released?

1.6.11 (latest npm stable) doesn't seem to support it yet, and the 2.x versions are still alpha and I can't find any changelog to make sure I upgrade correctly.

Thanks.

kachar commented 5 years ago

You can find the binary canvas-prebuilt-v2.2.0-node-v67*.tar.gz at

https://github.com/node-gfx/node-canvas-prebuilt/releases/tag/v2.2.0

FezVrasta commented 5 years ago

Thanks, I'm using vega and I get the warning saying Node 11 is not supported, I guess they have to upgrade something then...

kachar commented 5 years ago

As I see vega-canvas is stuck at "canvas-prebuilt": "^1.6.5-prerelease.1" https://github.com/vega/vega-canvas/blob/master/package.json

LinusU commented 5 years ago

Seems like what vega does is now built right into the Canvas library. Importing e.g. createCanvas or loadImage will work both in Node.js and in the browser, thanks to this file:

https://github.com/Automattic/node-canvas/blob/master/browser.js