Skip to content
rncrtr edited this page Oct 29, 2014 · 34 revisions

##Frequently Asked Questions

1. "Error: failed to connect to [localhost:27017]"

MongoDB isn't running, please run it before you run node server...
Consider MongoDB a program that needs to be running before you can run grunt on your MEAN project.
Follow these instructions here for mongodb installation:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ Manual Installation is the only manner I could get things working

I also needed to be in /usr/local/bin before I could fire mongod Once mongod is running in your terminal window, open a different terminal window and cd to the directory where your MEAN project is located.

There you can run a grunt command and avoid the dreaded warning: [nodemon] app crashed - waiting for file changes before starting...

At that point, you can navigate to http://localhost:3000

Mcferren thanks for the explanation


2. "I run grunt but see a white screen with nothing in it"
Either you havn't run npm install or it in turn did not trigger bower install


3. "I run grunt as documented but get a command line not found"
Install grunt-cli globally - npm install grunt-cli -g


4. "I get Error: EMFILE, too many open files” in npm install."
See http://otaqui.com/blog/1618/how-to-fix-error-emfile-too-many-open-files-from-yeoman-and-npm/
or - set your ulimit higher if using a Mac ulimit -n 1024


5. "Even after installing git, I still get 'Prerequisite not installed : git' error when I try mean init."
Does git -v work from the command line? If not, you probably need to add the git executable to your PATH.


6. "I get the following issue when opening my mean app in a browser. MongoDB seems to be running fine, and the grunt command works fine."

[nodemon] starting node --debug server.js
debugger listening on port 5858
Mean app started on port 3000 (development)
GET / 200 28.054 ms - -

events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '../myApp/bower_components/bootstrap/dist/css/bootstrap.css'

bootstrap.css is installed as part of bootstrap by bower, which is automatically run as a postinstall script after npm install. Sometimes, if there are errors during the npm install, or permissions problems for bower, this process does not complete.

Please try node node_modules/bower/bin/bower install from your project root. Or if you already have bower installed globally, you just run bower install. This should either install the missing file(s), or help lead to the root of problem (usually permisssions).

If you are installing from root, you can do sudo bower install --allow-root (NOT recommended).


6. "public/lib directory does not get created"
Your .bowerrc has not been copied - If you're on a mac - @jpattisoninc offered a way to make sure that dot files are being copied too.

Clone this wiki locally