0

I'm working with mean.io and this tutorial: http://code.tutsplus.com/tutorials/introduction-to-the-mean-stack--cms-19918

I am able to get everything working fine locally. I added everything, did a commit, then pushed to my remote.

90% of the push seems to work (db connection is working, I'm not getting a 404 or 503). The problem is that I'm getting this node.js error in the logs:

events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: ENOENT, open '/srv/data/web/vhosts/default/public/system/lib/bootstrap/dist/css/bootstrap.css'
Mean app started on port 8080 (production)

As you can see, the app is running correctly on port 8080. (So the page responds and 'loads.') However, the file '/srv/data/web/vhosts/default/public/system/lib/bootstrap/dist/css/bootstrap.css' appears to not be on the remote server, so none of my css is working and the page just loads blankly.

I FTPd into the server and the entire /lib/ directory is missing (including sub directories of course).

Locally, all of the directories and files exist. However, I cannot figure out why my remote push didn't include everything. I did a 'git status' and everything appears tracked.

Any help? Did I do something wrong with installing things locally with the -g flag that then doesn't translate to them being included in the commit? Thanks!

RoccoMaxamas
  • 339
  • 2
  • 5
  • 14
  • git doesn't deal with directories at all -- it deals only with files, and creates directories that have files in them. – Charles Duffy Jun 13 '14 at 20:18
  • Also, "push" doesn't deal with files -- it deals with commits, so you need to focus on looking at which files were and weren't in your commits that you pushed. – Charles Duffy Jun 13 '14 at 20:19
  • ...so, the thing to make sure is that you actually added, and committed, files within your `lib` directory. Use a tool such as `tig` to look at your commits in history. – Charles Duffy Jun 13 '14 at 20:19
  • If you can come up with a set of exact steps we can use to reproduce your problem -- steps we could copy and paste to our own command line that *should* commit a `lib` directory but don't -- this would be a question we could answer here. As it is, it's a poor fit. – Charles Duffy Jun 13 '14 at 20:21
  • @CharlesDuffy I'm new to all of this (hence the tutorial), so I unfortunately am not sure how to give any additional info. None of the missing directories are empty, so I'm not sure why they are aren't incorporated. But I understand that the info is hard to follow and not a lot to work with, so thanks anyway. – RoccoMaxamas Jun 13 '14 at 21:23
  • On the repo you pushed from, do `git ls-files path/to/a/file/that/didnt/make/it`. That will list the file if it's tracked. – jthill Jun 13 '14 at 21:56

1 Answers1

0

If you have an empty directory, it won't be added to your git repo -- there needs to be a file in there.

Consider creating a .gitignore file in this directory that ignores all files. See here:

How can I add an empty directory to a Git repository?

Community
  • 1
  • 1
Erik Mitchell
  • 405
  • 1
  • 4
  • 10
  • The directory isn't empty though. It seems to be something to do with my bower install, since the public/services/lib directory is where bower installs its files. – RoccoMaxamas Jun 13 '14 at 21:17