probmods / webppl-viz

Visualization for WebPPL
http://probmods.github.io/webppl-viz/
Other
14 stars 9 forks source link

ReferenceError: document is not defined #82

Closed rmoehn closed 7 years ago

rmoehn commented 7 years ago

When I want to run a WebPPL program with webppl-viz, I get ReferenceError: document is not defined. This problem is already described in issue #79. I'll just add my workaround here, so that people can find it more easily.

Assuming that you've installed all your WebPPL stuff in ~/.webppl, run this:

for p in $(find ~/.webppl -name canvas |grep 'node_modules/canvas$' |sed 's/node_modules\/canvas//'); do
    npm --prefix=$p uninstall canvas && npm --prefix=$p install canvas@1.6.4
done

This sets all occurrences of canvas to 1.6.4.

And sorry if my Bash is inelegant…

longouyang commented 7 years ago

Thanks for the workaround -- I just merged #79 so I'll close this issue. (And apologies for the delay -- just got back from vacation)

rmoehn commented 7 years ago

Thanks! And no worries; vacations are important.