1

The Problem

I want to keep all of my development files in vagrant so that passing them to other developers we can all run a similar environment. I've created my provision files and keep getting the following error.

command line error screen grab

After hitting google I tried a few different things, and I'm still not getting the results. Any help would be awesome.

Tried Solutions

Here are the attempts things I have tried.

Update (tried to do this):

mkdir -p ~/$APPNAME/local
ln -s ~/$APPNAME/local /vagrant/$APPNAME/.meteor/local

Other things I've tried include symbolically linking the .meteor folder from the vagrant box to the one in the shared file. I've also tried manually deleting the lock file, but no luck there either.

In comments it said run it outside the mounted file, but I don't know exactly what that means and it doesn't seem much like a solution.

Here is my provision file for the vagrant box

# Declare Variable Name for Application
# =======================================
APPNAME="myCoolTestApp"

# Dev Tools
# =======================================
echo "Developer Tools install"
apt-get -y install curl git python-software-properties
apt-get -y install gcc
apt-get -y update

# Folder Sync
# =======================================
echo "Folder Sync"
if ! [ -L /var/www ]; then
  rm -rf /var/www
  ln -fs /vagrant /var/www
fi

# Node - NPM - Mongo
# =======================================
echo "Node"
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
apt-add-repository ppa:chris-lea/node.js
apt-get install -y nodejs
apt-get install -y build-essential
apt-get -y install mongodb
apt-get -y update

# Meteor JS
# =======================================
echo "Installing Vagrant"
su vagrant
curl https://install.meteor.com/ | sh
meteor --version

# App Specific
# =======================================
echo "Create the App"
meteor create /vagrant/$APPNAME

# Cleanup
# =======================================
chown -R vagrant:vagrant /vagrant  #changes ownership
apt-get -y update
apt-get -y autoremove
apt-get -y autoclean
Community
  • 1
  • 1
David J. Davis
  • 906
  • 7
  • 20

2 Answers2

2

I'm not 100% sure what's going on, but I do know that Node 0.12 is the wrong version for Meteor. Version 0.10.36 specifically has to be installed.

I would strongly recommend using mup to deploy to your Vagrant box, it hugely simplifies the process for you.

CaptSaltyJack
  • 15,283
  • 17
  • 70
  • 99
1

I have a better workaround if you are not affraid of using external mongodb:

  1. Install mongodb on vagrant box
  2. Use export MONGO_URL="mongodb://127.0.0.1:27017/<dbname>"
  3. Start meteor

This way, the meteor does not depend anymore on the database that is created in users home folder, and sync works as expected

Sonne
  • 691
  • 1
  • 6
  • 20