Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Uncaught ReferenceError: require is not defined
posted 8 months 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?
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Devious Experiments for a Truly Passive Greenhouse!
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