管理员用户创建期间“mean init”失败

时间:2015-04-30 07:10:08

标签: mean-stack

我按照OS X上的平均堆栈的基本安装教程进行操作。 MongoDB正在运行,并且相信所有依赖项都已安装。

在我的第一个应用程序初始化期间,脚本在询问管理员用户密码时失败(在我输入任何内容作为管理员密码之前失败):

$ mean init myApp

? What would you name your mean app? myApp
? The Mean project is currently in developer preview. To help improve the -
  quality of this product, we collect anonymized data on how the mean-cli is used -
  You may choose to opt out of this collection now (by choosing 'N' at the below prompt)
  or at any time in the future by running the following command:

  mean disable user-reporting

  Do you want to help us improve the mean network (Y/n)?  Y
? Please provide your email so we can create your first admin user: joe@doe.com
? Please provide your username so we can create your first admin user: admin
Cloning branch: master into destination folder: myApp
git clone  --depth 1  -bmaster https://github.com/linnovate/mean.git "myApp"
Cloning into 'myApp'...


##############################################################
#
#   !!! MONGOOSE WARNING !!!
#
#   This is an UNSTABLE release of Mongoose.
#   Unstable releases are available for preview/testing only.
#   DO NOT run this in production.
#
##############################################################

    DB connection successful!

Please provide password so we can create your first admin user
prompt: password:  /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:246
        throw message;      
              ^
TypeError: Cannot read property 'length' of undefined
    at processResults (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1581:31)
    at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1619:20
    at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1157:7
    at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1890:9
    at Server.Base._callHandler (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:448:41)
    at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:481:18
    at MongoReply.parseBody (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
    at null.<anonymous> (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:439:20)
    at emit (events.js:107:17)
    at null.<anonymous> (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:201:13)

我可以在生成的app文件夹中手动创建用户。 但由此产生的应用程序似乎不完整,我无法启动它。

$ mean user joe@doe.com --addRole admin; 
  Adding role `admin` to user `joe@doe.com`

##############################################################
#
#   !!! MONGOOSE WARNING !!!
#
#   This is an UNSTABLE release of Mongoose.
#   Unstable releases are available for preview/testing only.
#   DO NOT run this in production.
#
##############################################################

    DB connection successful!

successfully updated

1 个答案:

答案 0 :(得分:0)