zensh / jsgen

[DEPRECATED]JsGen is a next generation,free, open source web software that you can generate a powerful website, such as blog, forum, etc. It is coded by pure JavaScript, based on Node.js, AngularJS, MongoDB.
http://angularjs.cn/
MIT License
1.56k stars 513 forks source link

npm start的时候报错 #29

Closed softlight0629 closed 11 years ago

softlight0629 commented 11 years ago

rrestjs process 2753 Checking config file starting... rrestjs process 2753 Config file checking complete, errors:0/72, warns:0/72

/Users/gxb/softlight/Project/Git/jsgen/app.js:18 jsGen.serverlog.error(err); ^ TypeError: Cannot call method 'error' of undefined at Domain. (/Users/gxb/softlight/Project/Git/jsgen/app.js:18:21) at Domain.EventEmitter.emit (events.js:93:17) at process.uncaughtHandler (domain.js:61:20) at process.EventEmitter.emit (events.js:123:20) npm ERR! jsgen@0.6.6 start: node app.js npm ERR! sh "-c" "node app.js" failed with 1 npm ERR! npm ERR! Failed at the jsgen@0.6.6 start script. npm ERR! This is most likely a problem with the jsgen package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node app.js npm ERR! You can get their info via: npm ERR! npm owner ls jsgen npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.2 npm ERR! command "node" "/usr/local/bin/npm" "start" npm ERR! cwd /Users/gxb/softlight/Project/Git/jsgen npm ERR! node -v v0.8.11 npm ERR! npm -v 1.1.62 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/gxb/softlight/Project/Git/jsgen/npm-debug.log npm ERR! not ok code 0

在Mac Os上启动的时候报错

zensh commented 11 years ago

可能是npm包没装完全,确认npm install没问题吗?能否把mylogs目录下的log文件内容贴出来

softlight0629 commented 11 years ago

mylogs没有日志输出, npm install 貌似是正常的

gmatoMacBook-Pro:jsgen gxb$ npm install
npm http GET https://registry.npmjs.org/rrestjs
npm http GET https://registry.npmjs.org/mongoskin
npm http GET https://registry.npmjs.org/marked
npm http GET https://registry.npmjs.org/redis
npm http GET https://registry.npmjs.org/thenjs
npm http GET https://registry.npmjs.org/nodemailer
npm http GET https://registry.npmjs.org/xss
npm http 304 https://registry.npmjs.org/mongoskin
npm http 304 https://registry.npmjs.org/rrestjs
npm http 304 https://registry.npmjs.org/thenjs
npm http 304 https://registry.npmjs.org/redis
npm http 304 https://registry.npmjs.org/marked
npm http 304 https://registry.npmjs.org/xss
npm http 304 https://registry.npmjs.org/nodemailer
npm WARN prefer global marked@0.2.9 should be installed with -g
npm http GET https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/simplesmtp
npm http GET https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/generic-pool/1.0.6
npm http GET https://registry.npmjs.org/jade/0.20.0
npm http GET https://registry.npmjs.org/log4js/0.6.0
npm http GET https://registry.npmjs.org/mime/1.2.7
npm http GET https://registry.npmjs.org/mongodb/1.1.6
npm http GET https://registry.npmjs.org/socket.io/0.8.7
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ejs/0.8.2
npm http GET https://registry.npmjs.org/less/1.3.0
npm http GET https://registry.npmjs.org/should/0.6.0
npm http GET https://registry.npmjs.org/now/0.8.1
npm http GET https://registry.npmjs.org/http-proxy/0.8.5
npm http GET https://registry.npmjs.org/request/2.11.4
npm http GET https://registry.npmjs.org/commander/1.0.5
npm http GET https://registry.npmjs.org/mkdirp/0.3.4
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/xml2js/0.2.3
npm http GET https://registry.npmjs.org/data2xml/0.8.0
npm http 304 https://registry.npmjs.org/simplesmtp
npm http 304 https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/bson/0.2.2
npm http GET https://registry.npmjs.org/kerberos/0.0.3
npm http 304 https://registry.npmjs.org/log4js/0.6.0
npm http 304 https://registry.npmjs.org/jade/0.20.0
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm http 304 https://registry.npmjs.org/mailcomposer
npm http 304 https://registry.npmjs.org/socket.io/0.8.7
npm http 304 https://registry.npmjs.org/mongodb/1.1.6
npm http 304 https://registry.npmjs.org/mime/1.2.7
npm http GET https://registry.npmjs.org/xoauth2
npm http GET https://registry.npmjs.org/rai
npm http GET https://registry.npmjs.org/mime/1.2.9
npm http GET https://registry.npmjs.org/mimelib
npm http 304 https://registry.npmjs.org/should/0.6.0
npm http 304 https://registry.npmjs.org/less/1.3.0
npm http 304 https://registry.npmjs.org/ejs/0.8.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/now/0.8.1
npm http 304 https://registry.npmjs.org/commander/1.0.5
npm http 304 https://registry.npmjs.org/request/2.11.4
npm http 304 https://registry.npmjs.org/http-proxy/0.8.5
npm http 304 https://registry.npmjs.org/mkdirp/0.3.4
npm http 304 https://registry.npmjs.org/xml2js/0.2.3
npm http 304 https://registry.npmjs.org/data2xml/0.8.0
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/bson/0.2.2
npm http 304 https://registry.npmjs.org/generic-pool/1.0.6
npm http 304 https://registry.npmjs.org/rai
npm http 304 https://registry.npmjs.org/xoauth2
npm http 304 https://registry.npmjs.org/kerberos/0.0.3
npm http GET https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/mimelib
npm http GET https://registry.npmjs.org/keypress

> kerberos@0.0.3 install /Users/gxb/softlight/Project/Git/jsgen/node_modules/mongoskin/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)

npm http GET https://registry.npmjs.org/socket.io-client/0.8.7
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/dequeue/1.0.3
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/bson/0.1.3
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/node-proxy
npm http 304 https://registry.npmjs.org/mime/1.2.9
npm http GET https://registry.npmjs.org/encoding
npm http GET https://registry.npmjs.org/addressparser

> bson@0.2.2 install /Users/gxb/softlight/Project/Git/jsgen/node_modules/mongoskin/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)

npm http 304 https://registry.npmjs.org/async/0.1.15
  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
  CXX(target) Release/obj.target/bson/ext/bson.o
  CXX(target) Release/obj.target/kerberos/lib/worker.o
npm http 304 https://registry.npmjs.org/dequeue/1.0.3
  CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
  CC(target) Release/obj.target/kerberos/lib/base64.o
  CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
  SOLINK_MODULE(target) Release/kerberos.node
  SOLINK_MODULE(target) Release/bson.node
  SOLINK_MODULE(target) Release/kerberos.node: Finished
  SOLINK_MODULE(target) Release/bson.node: Finished
npm http 304 https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/commander
npm WARN engine commander@0.2.1: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.11","npm":"1.1.62"})
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.8.7
npm http 304 https://registry.npmjs.org/bson/0.1.3
npm WARN package.json bson@0.1.3 No README.md file found!
npm http 304 https://registry.npmjs.org/optimist

> bson@0.1.3 install /Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/mongodb/node_modules/bson
> node install.js

npm http 304 https://registry.npmjs.org/redis/0.6.7
npm http 304 https://registry.npmjs.org/pkginfo
================================================================================
=                                                                              =
=  To install with C++ bson parser do <npm install mongodb --mongodb:native>   =
=                                                                              =
================================================================================
npm http 304 https://registry.npmjs.org/node-proxy
npm http GET https://registry.npmjs.org/wordwrap

> node-proxy@0.6.0 install /Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/now/node_modules/node-proxy
> node-gyp configure build

npm http 304 https://registry.npmjs.org/encoding
npm http 304 https://registry.npmjs.org/addressparser
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/uglify-js/1.0.6
npm http GET https://registry.npmjs.org/websocket-client/1.0.0
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
  CXX(target) Release/obj.target/nodeproxy/src/node-proxy.o
../src/node-proxy.cc:816:1: warning: control may reach end of non-void function
      [-Wreturn-type]
}
^
npm http 304 https://registry.npmjs.org/keypress
1 warning generated.
  SOLINK_MODULE(target) Release/nodeproxy.node
  SOLINK_MODULE(target) Release/nodeproxy.node: Finished
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/websocket-client/1.0.0
npm http 304 https://registry.npmjs.org/uglify-js/1.0.6
npm http 304 https://registry.npmjs.org/iconv-lite
thenjs@0.9.2 node_modules/thenjs

xss@0.0.6 node_modules/xss

marked@0.2.9 node_modules/marked

redis@0.8.6 node_modules/redis

mongoskin@0.6.0 node_modules/mongoskin
└── mongodb@1.3.19 (kerberos@0.0.3, bson@0.2.2)

rrestjs@1.3.5 node_modules/rrestjs
├── generic-pool@1.0.6
├── data2xml@0.8.0
├── mime@1.2.7
├── should@0.6.0
├── mkdirp@0.3.4
├── ejs@0.8.2
├── formidable@1.0.11
├── qs@0.5.1
├── request@2.11.4
├── uglify-js@1.2.5
├── less@1.3.0
├── log4js@0.6.0 (dequeue@1.0.3, async@0.1.15)
├── xml2js@0.2.3 (sax@0.5.5)
├── jade@0.20.0 (commander@0.2.1)
├── mongodb@1.1.6 (bson@0.1.3)
├── commander@1.0.5 (keypress@0.1.0)
├── now@0.8.1 (node-proxy@0.6.0)
├── http-proxy@0.8.5 (colors@0.6.2, pkginfo@0.2.3, optimist@0.3.7)
└── socket.io@0.8.7 (policyfile@0.0.4, redis@0.6.7, socket.io-client@0.8.7)

nodemailer@0.5.3 node_modules/nodemailer
├── simplesmtp@0.3.10 (xoauth2@0.1.8, rai@0.1.7)
└── mailcomposer@0.2.2 (mime@1.2.9, mimelib@0.2.13)
softlight0629 commented 11 years ago

调试的时候, 发现下面这段代码报错

require('rrestjs') Error: Problem reading log4js config { appenders: [ { category: 'angularjs.cn', type: 'logLevelFilter', level: 'error', appender: [Object], makers: [Object] } ] }. Error was "Cannot find module 'file'" (Error: Cannot find module 'file' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.loadAppender (/Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/log4js/lib/log4js.js:290:26) at Object.configure (/Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/log4js/lib/appenders/logLevelFilter.js:14:12) at /Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/log4js/lib/log4js.js:148:59 at Array.forEach (native) at configureAppenders (/Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/log4js/lib/log4js.js:144:22) at configureOnceOff (/Users/gxb/softlight/Project/Git/jsgen/node_modules/rrestjs/node_modules/log4js/lib/log4js.js:196:13))

softlight0629 commented 11 years ago

已经解决, 是Node 版本问题, 需要0.10.X