3

Windows 7 Home Premium 64 ビットでの実行

ダウンロード:

そして、次のことを意味するhttp://blog.nowjs.com/running-nowjs-natively-on-windowsの手順に従いました。

  • Microsoft Visual C++ ランタイムのインストール (私は x64 バージョンを入手しました)
  • github.com/Flotype/now/zipball/windows から now.js の「windows 用に修正された」バージョンを取得する

すべてが設定された状態で、'now' モジュールを必要とするサンプルを実行すると、socket.io モジュールが要求されます。

「npm install socket.io -g」の出力を実行すると:

C:\Windows\System32>npm install socket.io -g
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.10
npm http 304 https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/hiredis
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/ws
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/hiredis
npm WARN package.json hiredis@0.1.14 No README.md file found!

> hiredis@0.1.14 preinstall C:\Program Files\nodejs\node_modules\socket.io\node_
modules\redis\node_modules\hiredis
> make || gmake

cd deps/hiredis && make static
process_begin: CreateProcess(NULL, sh -c "type cc >/dev/null 2>/dev/null && echo
 cc || echo gcc", ...) failed.
process_begin: CreateProcess(NULL, sh -c "uname -s 2>/dev/null || echo not", ...
) failed.
make[1]: Entering directory `C:/Program Files/nodejs/node_modules/socket.io/node
_modules/redis/node_modules/hiredis/deps/hiredis'
std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g
-ggdb net.c
'std' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
make[1]: [net.o] Error 1 (ignored)
std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g
-ggdb hiredis.c
'std' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
make[1]: [hiredis.o] Error 1 (ignored)
std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g
-ggdb sds.c
'std' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
make[1]: [sds.o] Error 1 (ignored)
std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g
-ggdb async.c
'std' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
make[1]: [async.o] Error 1 (ignored)
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
process_begin: CreateProcess(NULL, ar rcs libhiredis.a net.o hiredis.o sds.o asy
nc.o, ...) failed.
make (e=2): O sistema não pode encontrar o arquivo especificado.
make[1]: *** [libhiredis.a] Error 2
make[1]: Leaving directory `C:/Program Files/nodejs/node_modules/socket.io/node_
modules/redis/node_modules/hiredis/deps/hiredis'
make: *** [all] Error 2
'gmake' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
npm WARN optional dep failed, continuing hiredis@0.1.14
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/options

> ws@0.4.21 install C:\Program Files\nodejs\node_modules\socket.io\node_modules\
socket.io-client\node_modules\ws
> node install.js

[ws v0.4.21] Attempting to compile blazing fast native extensions.
[ws v0.4.21] Native code compile failed (but the module will still work):
[ws v0.4.21] The native extensions are faster, but not required.
[ws v0.4.21] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.21] On Unix, native extensions require Python, make and a C++ compiler.

[ws v0.4.21] Start npm with --ws:verbose to show compilation output (if any).
socket.io@0.9.10 C:\Program Files\nodejs\node_modules\socket.io
+-- policyfile@0.0.4
+-- redis@0.7.2
+-- socket.io-client@0.9.10 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obf
uscator@0.0.1, ws@0.4.21)

何か不足していますか?node.js のバージョン 0.8.6-x64 および 0.8.5-x64 も試してみました。両方とも msi としてパッケージ化されています。

さらに、windows 用に修正されたバージョンの now.js を、helloworld_server.js サンプル内の node_modules フォルダーに直接配置し、「node helloworld_server.js」を実行すると、次のようになります。

[Error: no errorc:\xampp\htdocs\node-tcg\node_modules\now\bin\proxy.node]
Error: no errorc:\xampp\htdocs\node-tcg\node_modules\now\bin\proxy.node
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (c:\xampp\htdocs\node-tcg\node_modules\now\lib\proxy.j
s:10:13)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
4

1 に答える 1