I'm new to node.js and I need to use a module `websocket`. My server:

```
$ cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

$ node --version
v6.11.5

$ npm --version
3.10.10

```

Installed a module with `$ npm install websocket`, but when I tried my file it gives me this:

```
$ node /var/www/js/test.js
module.js:471
    throw err;
    ^

Error: Cannot find module 'websocket'

```

This is the first line of my JS file:

```
var WebSocketClient = require('websocket').client;

```

I also tried the following commands:

```
$ npm install websocket (with and without -g flag)
$ npm link websocket
$ npm install -d

```

But nothing helped.

`package.json`:

```
{
  "name": "root",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "websocket": "^1.0.25"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

```