Kitware / paraviewweb

Web framework for building interactive visualization relying on VTK or ParaView to produce visualization data
http://kitware.github.io/paraviewweb/
BSD 3-Clause "New" or "Revised" License
163 stars 50 forks source link

npm installation broken due to canvas dependency #498

Closed bek0s closed 5 years ago

bek0s commented 5 years ago

The command npm install paraviewweb --save fails due to the canvas dependency. To be more specific, I get a lot of errors similar to this:

../src/Canvas.cc:74:57: error: no matching function for call to ‘v8::Value::Uint32Value()’
   if (info[0]->IsNumber()) width = info[0]->Uint32Value();

Furthermore, it appears that, for some reason, an old version of canvas is used: canvas@1.6.13. Indeed, if I just run npm install canvas@1.6.13 --save I get the same error. However, if I write npm install canvas --save (which fetches version 2.5.0) it installs just fine.

If I do npm pack paraviewweb and grab the tarball of the package, I can see "canvas": "^1.6.9" under the dependencies section in the package.json. The canvas dependency appears to be removed from the latest version on GitHub.

I think it is a good idea to create a new npm release. Right now it is just impossible to install paraviewweb using npm.

Using a "clean/fresh" installation of Debian Linux (testing repo) and Node 12.6.0.

EDIT1: I forgot to mention that I have tried the installation using both gcc7.4 and gcc8.3. Same problem, no difference.

Thank you.

Robinxbnie commented 5 years ago

any news on this? I met the same issue.

jourdain commented 5 years ago

I'm guessing I might be able to tackle it at some point next week. Sorry for the delay.

Robinxbnie commented 5 years ago

I tried npm install it successfully after many trials/googles. It still gave me many warnings by saying something like: ‘...double v8::Value::NumberValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]...' But finally it gave me like below:

make: Leaving directory '/home/robinnie/.npm-packages/lib/node_modules/paraviewweb/node_modules/canvas/build'
+ paraviewweb@3.2.8
added 82 packages from 60 contributors in 13.395s

One trick for me is to avoid "sudo npm install ... because of permission error".

Thanks a lot.

jourdain commented 5 years ago

:tada: This issue has been resolved in version 3.2.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket: