wswebcreation / protractor-image-comparison

npm-module to compare images with protractor
86 stars 38 forks source link

Npm Install of the package is throwing error related to canvas #102

Closed Nagadinesh closed 5 years ago

Nagadinesh commented 5 years ago

Running on OSX, Mojave Command: npm install protractor-image-comparison

Here is the log I am seeing:

fsevents@1.2.7 install /Users/kothalan/Documents/temp/myupmc-web-goat/node_modules/fsevents node install

node-pre-gyp WARN Using request for node-pre-gyp https download [fsevents] Success: "/Users/kothalan/Documents/temp/myupmc-web-goat/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" is installed via remote

canvas@2.5.0 install /Users/kothalan/Documents/temp/myupmc-web-goat/node_modules/canvas node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(500): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.5.0/canvas-v2.5.0-node-v57-darwin-unknown-x64.tar.gz node-pre-gyp WARN Pre-built binaries not found for canvas@2.5.0 and node@8.15.1 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) Package pixman-1 was not found in the pkg-config search path. Perhaps you should add the directory containing pixman-1.pc' to the PKG_CONFIG_PATH environment variable No package 'pixman-1' found gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error:gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Darwin 18.2.0 gyp ERR! command "/usr/local/Cellar/node/11.11.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/kothalan/Documents/temp/*/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/kothalan/Documents/temp/*/node_modules/canvas/build/Release" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" gyp ERR! cwd /Users/kothalan/Documents/temp/*/node_modules/canvas gyp ERR! node -v v8.15.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.11.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/kothalan/Documents/temp/*/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/kothalan/Documents/temp/myupmc-web-goat/node_modules/canvas/build/Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/kothalan/Documents/temp/*/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Darwin 18.2.0 node-pre-gyp ERR! command "/usr/local/Cellar/node/11.11.0/bin/node" "/Users/kothalan/Documents/temp/*/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /Users/kothalan/Documents/temp/*/node_modules/canvas node-pre-gyp ERR! node -v v8.15.1 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok Failed to execute '/usr/local/Cellar/node/11.11.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/kothalan/Documents/temp/*/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/kothalan/Documents/temp/*/node_modules/canvas/build/Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! canvas@2.5.0 install:node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the canvas@2.5.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/kothalan/.npm/_logs/2019-07-22T15_46_39_264Z-debug.log

wswebcreation commented 5 years ago

@Nagadinesh

Strange this is that I'm also using a Mac and I don't have this issue. I'm using Mojave 10.14.5, I'm only on node 10.15.2.

Can you check what happens if you install canvas 2.6.0 with npm install --D canvas@2.6.0?

Nagadinesh commented 5 years ago

Sorry for delay, Looks like it got fixed now. I dont see any issue. Not sure if there is anything you can do about dependency of canvas. I frequently see issue with that package.

wswebcreation commented 5 years ago

Hi @Nagadinesh

I've been using PNG libraries is the past and they were not that stable at all so I moved to Canvas. The downside is that canvas for node is heavily under development , but for now the most stable solution, sorry.

I'm going to close the issue now because it seems fixed now for you. If it occurs again please reopen this one or file a new one