There are a few way's to install WebSocket's to your project. Here are some example's:
npm install --save ws
or inside your package.json using:
"dependencies": { "ws": "*" },