CENTOS 怎么安装 nodeclub呀..我安装各种错误.
发布于 2年前 作者 jackton 2457 次浏览

centos 6.4 64bit 安装了

Python 2.6.6
node v0.10.7
MongoDB shell version: 2.4.3

直接下载

https://github.com/cnodejs/nodeclub/archive/master.zip

解压后 运行

npm install -d

然后测试

make test

输出内容

npm WARN package.json nodeclub[@0](/user/0).3.3 No repository field.
npm WARN package.json debug[@0](/user/0).7.0 No repository field.
npm WARN package.json growl[@1](/user/1).7.0 No repository field.
npm WARN package.json ms[@0](/user/0).3.0 No repository field.
npm WARN package.json addressparser[@0](/user/0).1.3 No repository field.
path.exists is now called `fs.exists`.


  controllers/site.js
                             ✓ should /index 200 (142ms)
                                             ✓ should /?q=neverexistskeyword 200 (108ms)
                                                    ✓ should /?q=neverexistskeyword&q=foo2 200 (48ms)
--------------------省略----------------------------------
  ✖ 4 of 83 tests failed:

  1) showdown xss test should escape illegal url in a:
      
      actual expected
      
      <p><a href="http://localhostbbs.cnodejsyouku.orgcom:3000javascript:alert(123);">illegal url</a></p>
      
      at Object.Assertion.equal (/home/admin/domains/youku.com/public_html/bbs/node_modules/should/lib/should.js:303:10)
      at Context.<anonymous> (/home/admin/domains/youku.com/public_html/bbs/test/public/libs_showdown.js:18:19)
      at Test.Runnable.run (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runnable.js:213:32)
      at Runner.runTest (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:351:10)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:397:12
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:277:14)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:286:7
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:234:23)
      at Object._onImmediate (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:254:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)

  2) showdown xss test should escape " in a:
      
      actual expected
      
      <p><a href="http://localhostbbs.cnodejsyouku.orgcom:3000http://baidu.com"onmouseover='alert(123)'">illegal url</a></p>
      
      at Object.Assertion.equal (/home/admin/domains/youku.com/public_html/bbs/node_modules/should/lib/should.js:303:10)
      at Context.<anonymous> (/home/admin/domains/youku.com/public_html/bbs/test/public/libs_showdown.js:24:19)
      at Test.Runnable.run (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runnable.js:213:32)
      at Runner.runTest (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:351:10)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:397:12
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:277:14)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:286:7
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:234:23)
      at Object._onImmediate (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:254:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)

  3) showdown xss test should escape illegal url in img:
      
      actual expected
      
      <p><img src="http://localhostbbs.cnodejsyouku.orgcom:3000javascript:alert(123);" alt="illegal url" title="" /></p>
      
      at Object.Assertion.equal (/home/admin/domains/youku.com/public_html/bbs/node_modules/should/lib/should.js:303:10)
      at Context.<anonymous> (/home/admin/domains/youku.com/public_html/bbs/test/public/libs_showdown.js:30:19)
      at Test.Runnable.run (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runnable.js:213:32)
      at Runner.runTest (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:351:10)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:397:12
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:277:14)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:286:7
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:234:23)
      at Object._onImmediate (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:254:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)

  4) showdown xss test should escape " in img:
      
      actual expected
      
      <p><img src="http://localhostbbs.cnodejsyouku.orgcom:3000http://baidu.com"onmouseover='alert(123)'" alt="illegal url" title="" /></p>
      
      at Object.Assertion.equal (/home/admin/domains/youku.com/public_html/bbs/node_modules/should/lib/should.js:303:10)
      at Context.<anonymous> (/home/admin/domains/youku.com/public_html/bbs/test/public/libs_showdown.js:36:19)
      at Test.Runnable.run (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runnable.js:213:32)
      at Runner.runTest (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:351:10)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:397:12
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:277:14)
      at /home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:286:7
      at next (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:234:23)
      at Object._onImmediate (/home/admin/domains/youku.com/public_html/bbs/node_modules/mocha/lib/runner.js:254:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)

在运行

npm install ./
npm WARN package.json nodeclub[@0](/user/0).3.3 No repository field.
npm WARN package.json debug[@0](/user/0).7.0 No repository field.
npm WARN package.json growl[@1](/user/1).7.0 No repository field.
npm WARN package.json ms[@0](/user/0).3.0 No repository field.
npm WARN package.json addressparser[@0](/user/0).1.3 No repository field.

第一次使用nodejs我真崩溃啦…怎么回事这是

7 回复

然后CPU 100% 内存直接1G多… 7121 root 20 0 2113m 1.4g 6096 R 99.9 12.2 5:01.16 node app.js

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Socket.EventEmitter.addListener (events.js:160:15)
    at Socket.Readable.on (_stream_readable.js:679:33)
    at Socket.EventEmitter.once (events.js:179:8)
    at TCP.onread (net.js:527:26)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Socket.EventEmitter.addListener (events.js:160:15)
    at Socket.Readable.on (_stream_readable.js:679:33)
    at Socket.EventEmitter.once (events.js:179:8)
    at TCP.onread (net.js:527:26)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Socket.EventEmitter.addListener (events.js:160:15)
    at Socket.Readable.on (_stream_readable.js:679:33)
    at Socket.EventEmitter.once (events.js:179:8)
    at TCP.onread (net.js:527:26)

node app.js path.exists is now called fs.exists. NodeClub listening on port 3000 in development mode God bless love… You can debug your app with http://bbs.poneigou.com:3000

额 第一次遇到你说的这种情况。

运行日志

TypeError: object is not a function
    at callbacks (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:272:11)
    at param (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:246:11)
    at param (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:243:11)
    at pass (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:253:5)
    at Router._dispatch (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:280:5)
    at Object.Router.middleware [as handle] (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:45:10)
    at next (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/node_modules/connect/lib/http.js:204:15)
    at next (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/node_modules/connect/lib/http.js:206:9)
    at /home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/node_modules/connect/lib/middleware/static.js:150:11
    at Object.oncomplete (fs.js:107:15)
TypeError: object is not a function
    at callbacks (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:272:11)
    at param (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:246:11)
    at param (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:243:11)
    at pass (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:253:5)
    at Router._dispatch (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:280:5)
    at Object.Router.middleware [as handle] (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/lib/router/index.js:45:10)
    at next (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/node_modules/connect/lib/http.js:204:15)
    at next (/home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/node_modules/connect/lib/http.js:206:9)
    at /home/admin/domains/poneigou.com/public_html/bbs/node_modules/express/node_modules/connect/lib/middleware/static.js:150:11
    at Object.oncomplete (fs.js:107:15)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Socket.EventEmitter.addListener (events.js:160:15)
    at Socket.Readable.on (_stream_readable.js:679:33)
    at Socket.EventEmitter.once (events.js:179:8)
    at TCP.onread (net.js:527:26)

已经莫名其妙的好了。。。。。。。。。。。。。

回到顶部