$meteor run [[[[[ ~/bckd/homedir/learn/meteor/mycoolapp ]]]]] => Started proxy. => Started MongoDB. => Started your app. => App running at: http://localhost:3000/
当我尝试通过另一个终端连接到mongo时,我得到:
$meteor mongo mongo: Meteor isn't running a local MongoDB server. This command only works while Meteor is running your application locally. Start your application first. (This error will also occur if you asked Meteor to use a different MongoDB server with $MONGO_URL when you ran your application.) If you're trying to connect to the database of an app you deployed with `meteor deploy`, specify your site's name with this command.
试图解决这个问题我看了mongo命令,很快我想我可以连接使用:
$mongo localhost:3001
太好了,这很有效,似乎我能够暂时使用它.
但是……为什么是官方的方式:meteor mongo在我的设置中没有工作,我可以做任何事来解决它吗?
编辑2015年5月6日
在我的ubuntu上创建另一个帐户,登录并创建一个新应用程序后,我运行它并设法使用meteor mongo命令(没有sudo)连接到mongo实例.我认为这可能是我的环境变量不同的结果所以我比较了两者(使用env命令转储这两个环境.我的主帐户中有一些额外的bash变量因此我一个接一个地取消它们直到我达到两个相同的环境(除了主目录值,用户名,gnome会话令牌的自动生成值等).尽管有这些变化,但问题在于.我的另一个猜测是〜/ .meteor文件夹已经消失因此,我已经删除了它并重新安装了流星.这也没有解决它.无论问题是什么,它都非常顽固.
尝试:sudo meteor mongo
它在Vagrant盒子上为我工作:)
精彩评论