Register / Login
Win a copy of
Learn Java with Math: Using Fun Projects and Games
this week in the
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Uncaught ReferenceError: require is not defined
posted 1 month ago
In my js file I used the require command to import some libraries
var websocket = require('ws');
I added that js file to my index file like this way,
but when I load that file it shows as Uncaught ReferenceError: require is not defined in the browser console. How to resolve that issue?
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
Boost this thread!
Cannot understand why function is not detected in HTML
Rich Text Area using TinyMCE in Spring MVC application
Struts 2 / Tiles / Tiny MCE