Sarath C
Sarath C

Reputation: 237

Socket.io installation throws Missing required argument error

I'm running a socke.io application but everything was worked perfect in my previous server. But now I'm running in my new ubuntu server which is from Digitalocean.

The problem was Error: Cannot find module 'socket.io' Then I tried to install socket.io with the command.

npm install -g socket.io

But it gives me the error like :

npm ERR! Linux 4.15.0-140-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "socket.io"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:190:5
npm ERR! typeerror     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:35
npm ERR! typeerror     at Array.forEach (<anonymous>)
npm ERR! typeerror     at /usr/share/npm/node_modules/slide/lib/async-map.js:52:11
npm ERR! typeerror     at Array.forEach (<anonymous>)
npm ERR! typeerror     at asyncMap (/usr/share/npm/node_modules/slide/lib/async-map.js:51:8)
npm ERR! typeerror     at exports.loadRequestedDeps (/usr/share/npm/lib/install/deps.js:188:3)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/mysite.com/socket/npm-debug.log

Here is my configurations

Ubuntu : 20.04 NPM Version : v3.5.2 , Node Version : v8.10.0

How I can solve this issue and install socket.io ?

Thanks

Upvotes: 0

Views: 759

Answers (1)

Sarath C
Sarath C

Reputation: 237

Finally i fixed :)

below th fix

npm install -g [email protected]

Upvotes: 2

Related Questions