Not sure about error but in short term you can require the module directly using a path to it's URI on espruino.com (or anywhere else), or download it and require it from disk.
First approach v.simple:
var WebSocket = require("http://www.espruino.com/modules/ws.min.js")
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Not sure about error but in short term you can require the module directly using a path to it's URI on espruino.com (or anywhere else), or download it and require it from disk.
First approach v.simple: