I'm making a widget for an edX course and need to include certain 
browserified scripts.

In preview mode, the widget works fine but in live preview (as in normally 
accessing the course), the scripts are not loaded and the error in console 
says:

Uncaught TypeError: require is not a function
    at eval (eval at globalEval (lms-main_vendor.a04b73033169.js:1), 
<anonymous>:15:13)
    at eval (eval at globalEval (lms-main_vendor.a04b73033169.js:1), 
<anonymous>:388:3)
    at eval (<anonymous>)
    at Function.globalEval (lms-main_vendor.a04b73033169.js:1)
    at text script (lms-main_vendor.a04b73033169.js:4)
    at ajaxConvert (lms-main_vendor.a04b73033169.js:4)
    at done (lms-main_vendor.a04b73033169.js:4)
    at XMLHttpRequest.<anonymous> (lms-main_vendor.a04b73033169.js:4)
    at XMLHttpRequest.nrWrapper (1:14)
    at XMLHttpRequest.nrWrapper [as send] (1:14).

api.segment.io/v1/p Failed to load resource: net::ERR_BLOCKED_BY_CLIENT

Is there any way to get around this? The libraries I used in the browserify 
pack are node modules that I need in the browser.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/a44ad09b-04df-4023-99c9-267f1f6a9f50%40googlegroups.com.

Reply via email to