[Fixed] Node.js install ws unknown error?

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
So I am trying to make a private server for some friends and myself on Agar.io, I downloaded node.js and also python 3.5.0. I typed this command in my windows command prompt (cdm) "npm install ws" but end up with this error?

Code:
C:\Documents and Settings\pcuser>npm install ws
\
> [email protected] install C:\Documents and Settings\pcuser\node_modules\ws\node_m
odules\bufferutil
> node-gyp rebuild


C:\Documents and Settings\pcuser\node_modules\ws\node_modules\bufferutil>if not de
fined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules\npm
\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else
(node  rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack     at exports._errnoException (util.js:837:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack     at exports.spawn (child_process.js:339:9)
gyp ERR! stack     at exports.execFile (child_process.js:141:15)
gyp ERR! stack     at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\pcuser\node_modules\ws\node_modules\bufferu
til
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

> [email protected] install C:\Documents and Settings\pcuser\node_modules\ws\no
de_modules\utf-8-validate
> node-gyp rebuild


C:\Documents and Settings\pcuser\node_modules\ws\node_modules\utf-8-validate>if no
t defined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules
\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  e
lse (node  rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack     at exports._errnoException (util.js:837:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack     at exports.spawn (child_process.js:339:9)
gyp ERR! stack     at exports.execFile (child_process.js:141:15)
gyp ERR! stack     at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\pcuser\node_modules\ws\node_modules\utf-8-v
alidate
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\ws
├── [email protected]
└── [email protected]

C:\Documents and Settings\pcuser>

Can anyone tell me what error I am getting because to me it doesn't make sense.
 

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
Code:
gyp ERR! UNCAUGHT EXCEPTION

Update node-gyp
Code:
This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
I tried that, I did npm install -g node-gyp, it seemed like it updated or what not, if I did it incorrectly how can I update the files?
 

Adil

DevBest CEO
May 28, 2011
1,276
714
Hmm, that's strange. Do you have Visual Studio and all the appropriate SDK's installed?
This thread may help
 

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
I have vs but not sure on the sdk's will have to check. Heading off to work but would like to get this resolved so I will pm you and we can sky or tv, if that would help resolve this problem faster, thanks for the help so far.
 

Jaden

not so active
Aug 24, 2014
886
263
Code:
gyp ERR! UNCAUGHT EXCEPTION

Update node-gyp
Code:
This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
Yes I got the same message when I installed it, but the module was still there + it worked perfectly.
Its common to get NPM errors unless you're using very well-known modules.
 

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
Yes I got the same message when I installed it, but the module was still there + it worked perfectly.
Its common to get NPM errors unless you're using very well-known modules.
I don't know how you got it working because when I try to run my Ogar-master for agar private server I get this error.

Code:
E:\Agar\Ogar-master\src>node index.js
module.js:338
    throw err;
    ^

Error: Cannot find module 'ws'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (E:\Agar\Ogar-master\src\GameServer.js:2:17)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

E:\Agar\Ogar-master\src>pause
Press any key to continue . . .
 

Jaden

not so active
Aug 24, 2014
886
263
I don't know how you got it working because when I try to run my Ogar-master for agar private server I get this error.

Code:
E:\Agar\Ogar-master\src>node index.js
module.js:338
    throw err;
    ^

Error: Cannot find module 'ws'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (E:\Agar\Ogar-master\src\GameServer.js:2:17)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

E:\Agar\Ogar-master\src>pause
Press any key to continue . . .
You need to set directory before you run the NPM command... -_-

Code:
cd E:Agar\Ogar-master\src
npm install ws
 

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
Run the selected command in the node command line before running the npm command

Code:
cd E:Agar\Ogar-master\src

Still getting this, I did cd E:Agar\ etc
Code:
C:\Documents and Settings\pcuser>cd E:Agar\Ogar-master\src

C:\Documents and Settings\pcuser>npm install ws
\
> [email protected] install C:\Documents and Settings\pcuser\node_modules\ws\node_m
odules\bufferutil
> node-gyp rebuild


C:\Documents and Settings\pcuser\node_modules\ws\node_modules\bufferutil>if not de
fined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules\npm
\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else
(node  rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack     at exports._errnoException (util.js:837:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack     at exports.spawn (child_process.js:339:9)
gyp ERR! stack     at exports.execFile (child_process.js:141:15)
gyp ERR! stack     at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\pcuser\node_modules\ws\node_modules\bufferu
til
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

> [email protected] install C:\Documents and Settings\pcuser\node_modules\ws\no
de_modules\utf-8-validate
> node-gyp rebuild


C:\Documents and Settings\pcuser\node_modules\ws\node_modules\utf-8-validate>if no
t defined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules
\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  e
lse (node  rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack     at exports._errnoException (util.js:837:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack     at exports.spawn (child_process.js:339:9)
gyp ERR! stack     at exports.execFile (child_process.js:141:15)
gyp ERR! stack     at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\pcuser\node_modules\ws\node_modules\utf-8-v
alidate
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\ws
├── [email protected]
└── [email protected]

C:\Documents and Settings\pcuser>
 

Jaden

not so active
Aug 24, 2014
886
263
Still getting this, I did cd E:Agar\ etc
Code:
C:\Documents and Settings\pcuser>cd E:Agar\Ogar-master\src

C:\Documents and Settings\pcuser>npm install ws
\
> [email protected] install C:\Documents and Settings\pcuser\node_modules\ws\node_m
odules\bufferutil
> node-gyp rebuild


C:\Documents and Settings\pcuser\node_modules\ws\node_modules\bufferutil>if not de
fined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules\npm
\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else
(node  rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack     at exports._errnoException (util.js:837:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack     at exports.spawn (child_process.js:339:9)
gyp ERR! stack     at exports.execFile (child_process.js:141:15)
gyp ERR! stack     at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\pcuser\node_modules\ws\node_modules\bufferu
til
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

> [email protected] install C:\Documents and Settings\pcuser\node_modules\ws\no
de_modules\utf-8-validate
> node-gyp rebuild


C:\Documents and Settings\pcuser\node_modules\ws\node_modules\utf-8-validate>if no
t defined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules
\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  e
lse (node  rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack     at exports._errnoException (util.js:837:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack     at exports.spawn (child_process.js:339:9)
gyp ERR! stack     at exports.execFile (child_process.js:141:15)
gyp ERR! stack     at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack     at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\pcuser\node_modules\ws\node_modules\utf-8-v
alidate
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\ws
├── [email protected]
└── [email protected]

C:\Documents and Settings\pcuser>
Check if you got the folder node_modules and if you do... run the program.
Stop worrying about the fucking log -_-.

EDIT: if not cd probably doesn't work (that's what its looking like) make sure your directory is set correctly.
 

Users who are viewing this thread

Top