brianchirls / Seriously.js

A real-time, node-based video effects compositor for the web built with HTML5, Javascript and WebGL
MIT License
3.87k stars 354 forks source link

Can't import Seriously in a node environment #91

Closed juancabrera closed 9 years ago

juancabrera commented 9 years ago

When I'm trying to load it:

import Seriously from '../libs/seriously';

Got this error on the browser console:

Uncaught TypeError: Cannot read property 'document' of undefined

It seems it's something related with the scope, not sure. When I modified it to export the main function it doesn't throw any error, but then got lots of other kind of errors because the library is not working properly after that big change (sure cuz I removed the main scope and export the main function directly)

Any ideas ?

positlabs commented 9 years ago

Check out #85

juancabrera commented 9 years ago

@positlabs :+1:

that fixed it!

brianchirls commented 9 years ago

Thanks @juancabrera and @positlabs. I'll close this one for now as a duplicate and fix #85 as soon as I have time.