Uncaught ReferenceError: exports is not defined at retina.js:12
umairali opened this issue · comments
I am trying to add retinajs but I am facing this error
Uncaught ReferenceError: exports is not defined at retina.js:12
I am trying with js file
<script src="/assets/plugins/retinajs/retina.js"></script>
Same here!
Do you know what was the last versión working good ?
Same
Temp fix: add var exports={};
to retina.js
@migueldemoura temp fix makes it work for now.
Seems like it's the same problem as this: http://stackoverflow.com/questions/33294705/gulp-babel-exports-is-not-defined
This is a duplicate of #264
Same here. BTW where do you add migueldemoura's fix in the retina.js file? Tried at the end did not work. Sorry don't know JS. :S
@TsuNut add it above:
Object.defineProperty(exports, "__esModule", { value: true });
on line 11 in the retina.js file
Thanks! However, I included the fix on line 11 as per instructed. No change. Reverted to 2.0.0, still no change. Wonder if using Gulp and/or concatenating has something to do with my issue?
Beware, adding exports as a variable will make all of your other scripts think you're using node.js, if you're not, many other scripts will fail!