2012-03-06 4 views
2

에 iodocs를 설치 나는 처음 this problem 있었다, 그래서 나는 오직 하나 명의 경고,리눅스

작동하는 것 같다
npm install --force 

을 시도 :

npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url'] 

하지만 그것을 실행하려고하면, 그것은 나를 준다 :

[[email protected] iodocs]$ node ./app.js 
The "sys" module is now called "util". It should have a similar interface. 

node.js:201 
     throw e; // process.nextTick error, or 'error' event on first tick 
      ^
Error: Cannot find module 'hashlib' 
    at Function._resolveFilename (module.js:332:11) 
    at Function._load (module.js:279:25) 
    at Module.require (module.js:354:17) 
    at require (module.js:370:17) 
    at Object.<anonymous> (/home/ec2-user/iodocs/app.js:37:19) 
    at Module._compile (module.js:441:26) 
    at Object..js (module.js:459:10) 
    at Module.load (module.js:348:31) 
    at Function._load (module.js:308:12) 
    at Array.0 (module.js:479:10) 

나는 무엇을해야할지 모르겠다.

BTW, 나는 리눅스 2.6.35.14-97.44.amzn1.x86_64 EC2 인스턴스에 iodocs를 설치하는 것을 시도하고있다.

=========================== 업데이트 ================== ===============

나는 또한 Heroku에 설치하려고했지만 동일한 문제가 발생합니다.

-----> Heroku receiving push 
-----> Node.js app detected 
-----> Resolving engine versions 
     Using Node.js version: 0.6.12 
     Using npm version: 1.0.106 
-----> Fetching Node.js binaries 
-----> Vendoring node into slug 
-----> Installing dependencies with npm 
     npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url'] 
     npm ERR! Unsupported 
     npm ERR! Not compatible with your version of node/npm: [email protected] 
     npm ERR! Required: {"node":"0.4.x","teleport":">=0.2.0"} 
     npm ERR! Actual: {"npm":"1.0.106","node":"0.6.12"} 
     npm ERR! 
     npm ERR! System Linux 2.6.32-342-ec2 
     npm ERR! command "/tmp/node-node-kXeE/bin/node" "/tmp/node-npm-1IT8/cli.js" "install" 
     npm ERR! cwd /tmp/build_3mjp7psqka071 
     npm ERR! node -v v0.6.12 
     npm ERR! npm -v 1.0.106 
     npm ERR! code ENOTSUP 

     > [email protected] preinstall /tmp/build_3mjp7psqka071/node_modules/hashlib 
     > node-waf clean || true; node-waf configure build 

     npm ERR! 
     npm ERR! Additional logging details can be found in: 
     npm ERR!  /tmp/build_3mjp7psqka071/npm-debug.log 
     npm not ok 
     Nothing to clean (project not configured) 
     Checking for program g++ or c++   : /usr/bin/g++ 
     Checking for program cpp     : /usr/bin/cpp 
     Checking for program ar     : /usr/bin/ar 
     Checking for program ranlib    : /usr/bin/ranlib 
     Checking for g++       : ok 
     Checking for program gcc or cc   : /usr/bin/gcc 
     Checking for gcc       : ok 
     Checking for node path     : not found 
     Checking for node prefix     : ok /tmp/node-node-kXeE 
     'configure' finished successfully (0.476s) 
     Waf: Entering directory `/tmp/build_3mjp7psqka071/node_modules/hashlib/build' 
     [1/6] cc: libhash/md4c.c -> build/Release/libhash/md4c_1.o 
     [2/6] cc: libhash/md5c.c -> build/Release/libhash/md5c_1.o 
     [3/6] cc: libhash/sha0c.c -> build/Release/libhash/sha0c_1.o 
     [4/6] cxx: hashlib.cc -> build/Release/hashlib_2.o 
     ../hashlib.cc:14:16: error: ev.h: No such file or directory 
     ../hashlib.cc:15:17: error: eio.h: No such file or directory 
     ../hashlib.cc:311: error: 'eio_req' was not declared in this scope 
     ../hashlib.cc:311: error: 'req' was not declared in this scope 
     ../hashlib.cc:312: error: expected ',' or ';' before '{' token 
     Waf: Leaving directory `/tmp/build_3mjp7psqka071/node_modules/hashlib/build' 
     Build failed: -> task failed (err #1): 
     {task: cxx hashlib.cc -> hashlib_2.o} 
!  Failed to install dependencies with npm 
!  Heroku push rejected, failed to compile Node.js app 

답변

2

동일한 문제가 발생했습니다.

나는이 문제를 해결할 수있는 "풀 요청"이 있다고 생각 : https://github.com/mashery/iodocs/pull/14

내가 그것을 구현하는거야이 그것을 작동하는 경우,보고합니다.

편집 :

나는 더 얻을 수있었습니다. .

  1. 은 2.4.8이 당신의 "express": "2.5.8" (버전을 업데이트 package.json에
  2. 위에 링크 된 풀 요구를 구현 Node.js를 v1에와 호환되지 않습니다 : 여기에 당신이해야 할 몇 가지가 있습니다 당신이을 실행하면 .0.0
  3. , 그러나 "iosdocs/node_modules"

npm install 지금 작업을해야 .

에서 "hashlib"디렉토리를 제거, 나는이 오류를 받고 있어요 :

The "sys" module is now called "util". It should have a similar interface. Express server listening on port 3000

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick

편집 # 2 :

그것을 알아 냈어! 실제로는 redis-server (DUH)을 실행해야합니다. NOW node ./app.js를 실행하고 작동,

  • src/redis-server
  • 빵으로 서버를 실행 구축, 압축 해제에서 감독의 지시를 따르

    1. Download redis 2.4.8 from their site
    2. :

      그래서 나는 다음과 같은했다!

    0

    hashlib에 대해 동일한 모듈 오류가 발생했습니다. 문제를 해결 한 후 ieper 폴더를 지우고 대신 jsonmccreary's fork of iodocs을 사용했습니다.

    의 repo를 복제 한 후, 여기에 내가 무슨 짓을했는지 :

    1. npm install
    2. sudo apt-get install redis-server
    3. 는 이제 레디 스 서버 '레디 스 서버'

    을 실행 시작 설치 레디 스 서버 , 실행 node ./app.js 작품!

    편집 :

    제이슨 내가 그의 포크를 발견 iodocs on his blog에 대한 Heroku가를 구성하는 방법에 대한 몇 가지 문제를 이야기합니다.