phodal/lan

TypeError: Cannot call method 'get' of undefined

damoyelang1992 opened this issue · 4 comments

你好, 我刚开始使用您的lan工程,在安装完毕运行的时候遇见这个问题:
ubuntu@ip-172-31-21-12:~/lan$ npm start

lan@0.1.0 start /home/ubuntu/lan
node server.js
/home/ubuntu/lan/server.js:16
if (_.include(app.config.get('modules'), 'websocket')) {
^
TypeError: Cannot call method 'get' of undefined
at start (/home/ubuntu/lan/server.js:16:28)
at Object. (/home/ubuntu/lan/server.js:37:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

还有在
5.Start Cron
npm jobs/cron.js
出现:
ubuntu@ip-172-31-21-12:~/lan$ npm jobs/cron.js
Usage: npm
where is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache,
completion, config, ddp, dedupe, deprecate, docs, edit,
explore, faq, find, find-dupes, get, help, help-search,
home, i, info, init, install, isntall, issues, la, link,
list, ll, ln, login, ls, outdated, owner, pack, prefix,
prune, publish, r, rb, rebuild, remove, repo, restart, rm,
root, run-script, s, se, search, set, show, shrinkwrap,
star, stars, start, stop, submodule, tag, test, tst, un,
uninstall, unlink, unpublish, unstar, up, update, v,
version, view, whoami
npm -h quick help on
npm -l display full usage info
npm faq commonly asked questions
npm help search for help on
npm help npm involved overview
Specify configs in the ini-formatted file:
/home/ubuntu/.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config
npm@1.3.10 /usr/share/npm

在Google上面没有找到答案,到您这请教一下。再次感谢您做出这么好的工程

应该是没有配置,查看一下你的NODE_ENV,再看一下config目录下有没有相应的配置文件。

同样的问题,,求大侠指点

@sunnyhub 上面不是也写着NODE_ENV

@ damoyelang1992 @sunnyhub 已经修好了