nypublicradio / audiogram

Turn audio into a shareable video.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to install canvas 1.6.0 in node 10.15.0

sbala69gmail opened this issue · comments

I had tried to install audiogram in latest node 10.15.0 environment, Installation process stops while building canvas 1.6.0 module. Kindly fix audiogram to work in latest node js also.

in your package.json you have canvas to be installed on particualr commit like this "canvas": "git+https://github.com/chearon/node-canvas.git#12971f64a66b", remove #12971f64a66b and delete node_modules and run npm install it should work

Deleting the canvas version & rebuilding didn't help

node-pre-gyp ERR! Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.0.0-alpha.13/canvas-prebuilt-v2.0.0-alpha.13-node-v72-darwin-unknown-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for canvas@2.0.0-alpha.13 and node@12.16.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
  SOLINK_MODULE(target) Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/backend/Backend.o
  CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o
In file included from ../src/backend/ImageBackend.cc:1:
../src/backend/ImageBackend.h:27:32: error: no template named 'Handle' in namespace 'v8'
    static void Initialize(v8::Handle<v8::Object> target);
                           ~~~~^
../src/backend/ImageBackend.cc:71:20: error: variable has incomplete type 'void'
void ImageBackend::Initialize(Handle<Object> target)
                   ^
../src/backend/ImageBackend.cc:71:38: error: 'Object' does not refer to a value
void ImageBackend::Initialize(Handle<Object> target)
                                     ^
/Users/bapac/Library/Caches/node-gyp/12.16.1/include/node/v8.h:3496:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/backend/ImageBackend.cc:71:31: error: use of undeclared identifier 'Handle'
void ImageBackend::Initialize(Handle<Object> target)
                              ^
../src/backend/ImageBackend.cc:71:46: error: use of undeclared identifier 'target'
void ImageBackend::Initialize(Handle<Object> target)
                                             ^
../src/backend/ImageBackend.cc:71:53: error: expected ';' after top level declarator
void ImageBackend::Initialize(Handle<Object> target)
                                                    ^
                                                    ;
6 errors generated.
make: *** [Release/obj.target/canvas/src/backend/ImageBackend.o] Error 1

in your package.json you have canvas to be installed on particualr commit like this "canvas": "git+https://github.com/chearon/node-canvas.git#12971f64a66b", remove #12971f64a66b and delete node_modules and run npm install it should work

Worked for me, thanks

@ValeriiTT what machine did you try this on? what versions?

@ChaiBapchya Ubuntu 19.10, npm v7.5.4, node v10.15.2, node-gyp v7.1.2

This one change allowed my install to work. Thanks!