-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ReferenceError: sightglass is not defined (Electron) #699
Comments
You will need rivets.bundled or add also sightglass |
I used rivets.bundled.min.js. Tried with sightglass and then rivets and it still shows undefined. I'm not sure where the bug is... maybe it's related to ES2016 support? (Because with nw.js it works) Included in Electron it says 'undefined' |
No idea, whats going on. You can try this build: https://github.com/blikblum/rivets/tree/svelte/dist It integrates sightglass into rivets so should not have this problem Be aware that has some other changes that may fit or not your requirements. You can check them at https://github.com/blikblum/rivets/tree/svelte |
Somehow it works with your build, but not with the official one. Thanks P.S. To the author: It would be nice to see what's going on. I can't seem to find the problem. |
NOTE: I apologize for the lack of clarity. I came up with a solution to this exact issue 2 months ago and have since forgotten a lot of it. I had this issue awhile back. I "fixed" it by monkey patching the imports not to do any of the various import/export stuff from commonJS or ES6, and then concatenated them into a vendor.js file that gets placed as a script file within the <script> tag in the index.html file within Electron. Rivets and sightglass are included separately, with jquery coming before sightglass which comes before rivets. (This is handled within a gulpfile that concatenates and minifies all these files together into a vendor.js file) Thus, rivets and sightglass doesn't get confused this way about what export/import method to use and uses the old broken goodness defaults of how we handled imports in 2008. :) Definitely a hack. I don't recommend it, but for those struggling with this, you may want to approach something similar as a workaround. This is what I commented out at the end of SightglassJS. // Export module for Node and the browser. |
I'm getting the same error (Uncaught ReferenceError: sightglass is not defined) when using rivets bundled in a Browserify module. @blikblum's build link is no longer active. |
@blimpmason
|
You can try tinybind, a fork of rivets with many bug fixes and other improvements |
I tried to use the latest 0.9.4 from CDN. I use the latest Electron build: electron-v1.4.10-win32-ia32. And every time I get:
Why is this?
The text was updated successfully, but these errors were encountered: