Problems installing canvas/webppl-viz on mac

70 views
Skip to first unread message

Isaac Davis

unread,
Mar 13, 2020, 12:12:50 PM3/13/20
to webppl-dev
Hi folks. I'm pretty new to WebPPL and trying to install some packages on my Mac (OS 10.15.3). I followed the basic instructions for installing WebPPL and ran the test file, which worked fine. But I am having serious issues trying to install webppl-viz/Canvas

Per the instructions on https://github.com/probmods/webppl-viz/blob/master/README.md, I ran "npm install canvas," and it seemed to install something, but I got the following messages:

node-pre-gyp WARN Using needle for node-pre-gyp https download 

[canvas] Success: "/Users/isaacdavis/node_modules/canvas/build/Release/canvas.node" is installed via remote

npm WARN saveError ENOENT: no such file or directory, open '/Users/isaacdavis/package.json'

npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN enoent ENOENT: no such file or directory, open '/Users/isaacdavis/package.json'

npm WARN isaacdavis No description

npm WARN isaacdavis No repository field.

npm WARN isaacdavis No README data

npm WARN isaacdavis No license field.


I then tried to install webppl-viz through the following commands:


mkdir ~/.webppl

cd .webppl

npm install probmods/webppl-viz


This prompted a slew of error messages that I don't know how to parse. I apologize for the long copy-pasted message, but I really have no idea what most of this means. Thanks in advance to anyone who has advice!

-Isaac


npm WARN deprecated bo...@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

npm WARN deprecated coffee...@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

npm WARN deprecated cor...@2.4.1: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

npm WARN deprecated cryp...@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

npm WARN deprecated domelem...@1.3.0: update to domelem...@1.3.1

npm WARN deprecated cor...@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

npm WARN deprecated mini...@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated fsev...@1.1.1: Way too old

npm WARN deprecated grace...@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

npm WARN deprecated mini...@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated ha...@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.

npm WARN deprecated ho...@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

npm WARN deprecated is-my-js...@2.16.0: catastrophic backtracking in regexes could potentially lead to REDOS attack, upgrade to 2.17.2 as soon as possible

npm WARN deprecated node...@0.9.5: you are strongly encouraged to use other testing options

npm WARN deprecated req...@2.79.0: request has been deprecated, see https://github.com/request/request/issues/3142

npm WARN deprecated sn...@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.

npm WARN deprecated topo...@1.6.27: Use topojson-client, topojson-server or topojson-simplify directly.


> can...@1.6.4 install /Users/isaacdavis/node_modules/webppl-viz/node_modules/canvas

> node-gyp rebuild


./util/has_lib.sh: line 31: pkg-config: command not found

gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp

gyp ERR! configure error 

gyp ERR! stack Error: `gyp` failed with exit code: 1

gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)

gyp ERR! stack     at ChildProcess.emit (events.js:311:20)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

gyp ERR! System Darwin 19.3.0

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /Users/isaacdavis/node_modules/webppl-viz/node_modules/canvas

gyp ERR! node -v v12.16.1

gyp ERR! node-gyp -v v5.0.5

gyp ERR! not ok 


> fsev...@1.1.1 install /Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents

> node install


node-pre-gyp info it worked if it ends with ok

node-pre-gyp verb cli [

node-pre-gyp verb cli   '/usr/local/bin/node',

node-pre-gyp verb cli   '/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/node_modules/.bin/node-pre-gyp',

node-pre-gyp verb cli   'install',

node-pre-gyp verb cli   '--fallback-to-build'

node-pre-gyp verb cli ]

node-pre-gyp info using node-p...@0.6.33

node-pre-gyp info using no...@12.16.1 | darwin | x64

node-pre-gyp verb command install []

node-pre-gyp info check checked for "/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" (not found)

node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v72-darwin-x64.tar.gz

node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v72-darwin-x64.tar.gz

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v72-darwin-x64.tar.gz 

node-pre-gyp ERR! Pre-built binaries not found for fsev...@1.1.1 and no...@12.16.1 (node-v72 ABI) (falling back to source compile with node-gyp) 

node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v72-darwin-x64.tar.gz 

node-pre-gyp verb command build [ 'rebuild' ]

node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v72-darwin-x64.tar.gz 

node-pre-gyp ERR! Pre-built binaries not found for fsev...@1.1.1 and no...@12.16.1 (node-v72 ABI) (falling back to source compile with node-gyp) 

node-pre-gyp http Connection closed while downloading tarball file 

node-pre-gyp verb command build [ 'rebuild' ]

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.



No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.



No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.


gyp: No Xcode or CLT version detected!


gyp: No Xcode or CLT version detected!

gyp ERR! configure error 

gyp ERR! stack Error: `gyp` failed with exit code: 1

gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)

gyp ERR! stack     at ChildProcess.emit (events.js:311:20)

gyp ERR! gypstack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

 ERR! configure error 

gyp ERR! stack Error: `gyp` failed with exit code: 1

gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)

gyp ERR! stack     at ChildProcess.emit (events.js:311:20)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

gyp ERR! System Darwin 19.3.0

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64"

gyp ERR! cwd /Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents

gyp ERR! node -v v12.16.1

gyp ERR! node-gyp -v v5.0.5

gyp ERR! not ok 

gyp ERR! System Darwin 19.3.0

gyp ERR! commandnode-pre-gyp ERR! build error 

node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64' (1)

node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)

node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:311:20)

node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)

node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

node-pre-gyp ERR! System Darwin 19.3.0

node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd /Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents

node-pre-gyp ERR! node -v v12.16.1

node-pre-gyp ERR! node-pre-gyp -v v0.6.33

node-pre-gyp ERR! not ok 

 "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64"

Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64' (1)

gyp ERR! cwd /Users/isaacdavis/node_modules/webppl-viz/node_modules/fsevents

gyp ERR! node -v v12.16.1

gyp ERR! node-gyp -v v5.0.5

gyp ERR! not ok 


> spawn...@1.0.15 postinstall /Users/isaacdavis/node_modules/webppl-viz/node_modules/spawn-sync

> node postinstall



> web...@0.7.0 postinstall /Users/isaacdavis/node_modules/webppl-viz/node_modules/webppl

> ./scripts/adify


npm WARN saveError ENOENT: no such file or directory, open '/Users/isaacdavis/package.json'

npm WARN enoent ENOENT: no such file or directory, open '/Users/isaacdavis/package.json'

npm WARN isaacdavis No description

npm WARN isaacdavis No repository field.

npm WARN isaacdavis No README data

npm WARN isaacdavis No license field.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: can...@1.6.4 (node_modules/webppl-viz/node_modules/canvas):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: can...@1.6.4 install: `node-gyp rebuild`

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.1.1 (node_modules/webppl-viz/node_modules/fsevents):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.1.1 install: `node install`

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1


+ webpp...@0.0.1

added 882 packages from 1121 contributors and audited 2729 packages in 225.185s


2 packages are looking for funding

  run `npm fund` for details


found 156 vulnerabilities (26 low, 70 moderate, 59 high, 1 critical)

  run `npm audit fix` to fix them, or `npm audit` for details


Isaac Davis

unread,
Mar 13, 2020, 1:22:42 PM3/13/20
to webppl-dev
Edit to the above: I am now getting the same series of errors when I try to install any package.

I tried to install the bda package using 

npm install --prefix ~/.webppl mhtess/webppl-bda

And similarly with the csv package. Both attempts result in the same sequence of error messages below. Any advice would be greatly appreciated, I am coding the simulations for my dissertation in WebPPL and desperately need this to work. Thanks again!
-Isaac

null-a

unread,
Mar 13, 2020, 1:57:37 PM3/13/20
to webppl-dev
I can see a couple of errors in there that perhaps need addressing:

> ./util/has_lib.sh: line 31: pkg-config: command not found

On mac I think you can probably install this with brew.

gyp: No Xcode or CLT version detected!

It looks like you need to install either xcode or the developer command line tools from apple. (The latter might be a smaller/quicker install.)

Maybe fix those and try again?


Also, be aware that in my experience, webppl-viz is tricky to install. Here's a recipe that worked for me a few days ago:



Cheers,
Paul

Isaac Davis

unread,
Mar 16, 2020, 2:05:25 PM3/16/20
to webppl-dev
Thanks for the suggestions Paul! 

I was able to install pkg-config (at least I think it installed, it did not give me any errors) and Xcode, but I am still getting a very similar series of errors when I follow your instructions for webppl-viz. However, I now realize that I get the same sequence of errors when I try to install ANY webppl package, so I assume I must have gotten something wrong at an earlier stage of installation. Tomorrow I will uninstall everything and try again.

Best
-Isaac
Reply all
Reply to author
Forward
0 new messages