NetEase / pomelo

A fast,scalable,distributed game server framework for Node.js.
http://pomelo.netease.com
MIT License
11.86k stars 2.9k forks source link

Problem installing Pomelo on (possibly all) x64 Windows machines #418

Closed neatcode closed 7 years ago

neatcode commented 10 years ago

My computer runs on a 64-bit chip (AMD A8), with Windows 8.

Visual C++ 10 Express has been installed. Python 2.7 has been installed. The following error occurs when running "npm install -g" from a recent Github clone of the Pomelo repository. How do I fix this?:

Thanks in advance, Austin


npm http 304 https://registry.npmjs.org/bindings/1.1.0 npm http GET https://registry.npmjs.org/socket.io-client/0.9.16 npm http GET https://registry.npmjs.org/ndump

toobusy@0.2.4 install C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\nod e_modules\toobusy node-gyp rebuild

C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_modules\toobusy>node " C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\no de-gyp\bin\node-gyp.js" rebuild Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform .Targets(23,7): error MSB8007: The Platform for project 'toobusy.vcxproj' is in valid. Platform='x64'. You may be seeing this message because you are trying t o build a project without a solution file, and have specified a non-default Pla tform that doesn't exist for this project. [C:\Users\dev\AppData\Roaming\npm\no de_modules\pomelo\node_modules\toobusy\build\toobusy.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797: 12) gyp ERR! System Windows_NT 6.2.9200 gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu les\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_modules\t oobusy gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm http 304 https://registry.npmjs.org/ndump npm http 304 https://registry.npmjs.org/socket.io-client/0.9.16 npm http GET https://registry.npmjs.org/colors npm http GET https://registry.npmjs.org/eyes npm http GET https://registry.npmjs.org/winston npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/redis/0.7.3 npm http GET https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/stream-pkg/0.0.5 npm http GET https://registry.npmjs.org/node-uuid/1.4.0 npm http GET https://registry.npmjs.org/pomelo-loader/0.0.5 npm http 304 https://registry.npmjs.org/eyes npm http 304 https://registry.npmjs.org/colors npm http GET https://registry.npmjs.org/toobusy/0.2.2 npm http 304 https://registry.npmjs.org/winston npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/base64id/0.1.0 npm http 304 https://registry.npmjs.org/stream-pkg/0.0.5 npm http 304 https://registry.npmjs.org/redis/0.7.3 npm http 304 https://registry.npmjs.org/node-uuid/1.4.0 npm http 304 https://registry.npmjs.org/pomelo-loader/0.0.5 npm http 304 https://registry.npmjs.org/toobusy/0.2.2 npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/options npm http 304 https://registry.npmjs.org/commander npm http 304 https://registry.npmjs.org/tinycolor npm http 304 https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/bindings/1.0.0 npm http 304 https://registry.npmjs.org/bindings/1.0.0 npm http GET https://registry.npmjs.org/cycle npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/request npm http GET https://registry.npmjs.org/pkginfo npm http GET https://registry.npmjs.org/stack-trace npm http GET https://registry.npmjs.org/async/0.1.15 npm http GET https://registry.npmjs.org/semver npm http GET https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/cycle npm http 304 https://registry.npmjs.org/stack-trace npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/async/0.1.15 npm http 304 https://registry.npmjs.org/pkginfo npm http 304 https://registry.npmjs.org/semver npm http GET https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/string_decoder npm http GET https://registry.npmjs.org/dequeue/1.0.3 npm http 304 https://registry.npmjs.org/dequeue/1.0.3 npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http 304 https://registry.npmjs.org/zeparser/0.0.5

ndump@0.0.2 install C:\Users\dev\AppData\Roaming\npm\nodemodules\pomelo\node modules\pomelo-admin\node_modules\ndump node-gyp rebuild

C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_modules\pomelo-admin\n ode_modules\ndump>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bi n....\node_modules\node-gyp\bin\node-gyp.js" rebuild

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform .Targets(23,7): error MSB8007: The Platform for project 'ndump.vcxproj' is inva lid. Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platf orm that doesn't exist for this project. [C:\Users\dev\AppData\Roaming\npm\node _modules\pomelo\node_modules\pomelo-admin\node_modules\ndump\build\ndump.vcxpro j] gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797: 12) gyp ERR! System Windows_NT 6.2.9200 gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu les\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_modules\p omelo-admin\node_modules\ndump gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm ERR! error rolling back Error: EPERM, unlink 'C:\Users\dev\AppData\Roaming\n pm\node_modules\pomelo\node_modules\socket.io\node_modules\socket.io-client\node _modules\active-x-obfuscator\node_modules\zeparser\benchmark.html' npm ERR! error rolling back pomelo@0.8.8 { [Error: EPERM, unlink 'C:\Users\dev\ AppData\Roaming\npm\node_modules\pomelo\node_modules\socket.io\node_modules\sock et.io-client\node_modules\active-x-obfuscator\node_modules\zeparser\benchmark.ht ml'] npm ERR! error rolling back errno: 50, npm ERR! error rolling back code: 'EPERM', npm ERR! error rolling back path: 'C:\Users\dev\AppData\Roaming\npm\node _modules\pomelo\node_modules\socket.io\nodemodules\socket.io-client\node modules\active-x-obfuscator\node_modules\zeparser\benchmark.html' } npm ERR! toobusy@0.2.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the toobusy@0.2.4 install script. npm ERR! This is most likely a problem with the toobusy package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls toobusy npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" npm ERR! cwd C:\webstorm\pomelo npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! code ELIFECYCLE npm ERR! Error: ENOENT, lstat 'C:\Users\dev\AppData\Roaming\npm\node_modules\pom elo\node_modules\pomelo-rpc\node_modules\socket.io-client\lib\vendor\web-socket- js\flash-src\com\hurlant\crypto\tests\SHA224Test.as' npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" npm ERR! cwd C:\webstorm\pomelo npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! path C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_modules\ pomelo-rpc\node_modules\socket.io-client\lib\vendor\web-socket-js\flash-src\com\ hurlant\crypto\tests\SHA224Test.as npm ERR! fstream_path C:\Users\dev\AppData\Roaming\npm\nodemodules\pomelo\node modules\pomelo-rpc\node_modules\socket.io-client\lib\vendor\web-socket-js\flash- src\com\hurlant\crypto\tests\SHA224Test.as npm ERR! fstream_type File npm ERR! fstream_class FileWriter npm ERR! code ENOENT npm ERR! errno 34 npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst ream\lib\writer.js:284:26 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR! Error: ENOENT, lstat 'C:\Users\dev\AppData\Roaming\npm\node_modules\pom elo\node_modules\socket.io\node_modules\socket.io-client\node_modules\active-x-o bfuscator\node_modules\zeparser\benchmark.html' npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" npm ERR! cwd C:\webstorm\pomelo npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! path C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_modules\ socket.io\node_modules\socket.io-client\node_modules\active-x-obfuscator\node_mo dules\zeparser\benchmark.html npm ERR! fstream_path C:\Users\dev\AppData\Roaming\npm\nodemodules\pomelo\node modules\socket.io\node_modules\socket.io-client\node_modules\active-x-obfuscator \node_modules\zeparser\benchmark.html npm ERR! fstream_type File npm ERR! fstream_class FileWriter npm ERR! code ENOENT npm ERR! errno 34 npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fst ream\lib\writer.js:284:26 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)

ws@0.4.25 install C:\Users\dev\AppData\Roaming\npm\node_modules\pomelo\node_mo dules\ws

(node-gyp rebuild 2> builderror.log) || (exit 0)

neatcode commented 10 years ago

I found the solution. The current instructions for installing Pomelo WILL NOT WORK for Windows developers with x64 processors, which is most Windows developers.

Visual Studio C++ 2010 and Visual Studio C++ MUST BE UNINSTALLED for Pomelo installation to work on Windows 8 & 8.1. I think this is because they share PATH with the newer versions of Visual Studio that are required to compile the necessary components/dependencies on x64 processors.

To install Pomelo on Windows you need the following:

Additionally, for Windows 8 & 8.1:

Additionally, for Windows XP/Vista/7:

py8765 commented 10 years ago

Thanks for your suggestion.

rengeng1986 commented 10 years ago

thanks,i'll try

neatcode commented 10 years ago

No problem. The wiki & Readme.md need to be updated with this information for Windows users.