【发布时间】:2014-10-31 23:26:35
【问题描述】:
我无法在 Vagrant linux 机器(在 Mac 上运行)上启动新的 Meteor 应用程序。每次在 Mongo 中出现“未指定的未捕获异常”时都会失败。我已经尝试了很多方法来实现这一点,但即使使用最简单的设置,我也无法让项目运行。如有任何建议,我将不胜感激。
我的步骤是:
- 创建一个完全干净的 Vagrant 盒子(“ubuntu/trusty64”);
- 在新盒子上安装 Meteor (
curl https://install.meteor.com/ | sh); - 选择创建项目的位置;
- 创建一个新的 Meteor 项目 (
meteor create app); - 启动项目 (
cd app; meteor)
我知道 vagrant 共享文件夹的权限很奇怪,所以对于上面的第 3 步,我尝试将项目放入:
- 在共享来宾/主机文件夹中,
/vagrant, - 在 Vagrant 主文件夹 (
/home/vagrant) 的子目录中, - 在
/的子目录中(权限设置为vagrant:vagrant),并且 - 在
/的子目录中,权限设置为root:root,使用sudo meteor create app创建并使用sudo meteor运行的项目
在所有情况下,我都会看到此错误:
=> Started proxy.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start Mongo server.
MongoDB had an unspecified uncaught exception.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.
我无法判断这是 Vagrant 问题(尽管我认为不是,鉴于我已经尝试过)还是 Meteor 问题,但我怀疑它是 Meteor(或其众多依赖项之一)。我怀疑这是一个权限问题,因为它在以 root 身份运行时失败。我尝试从头开始构建流星,但构建失败,我尝试使用--release 0.9.0 和--release 0.9.2-rc1 创建项目,下载被简单地杀死,没有解释。
【问题讨论】: