Skip to content

Troubleshooting Guide

Gordon Potter edited this page Sep 21, 2013 · 1 revision

A list of issues and steps to their resolution

Installation Troubleshooting

Depending on environment settings some users may experience issues getting npm and grunt up and running.

Installing npm modules with your project

Ideally, specific npm modules should be bundled and installed with the project itself. This makes your project more portable.

After you have downloaded a copy of Ember App Kit you need to run the npm install command. This will download and install a variety of modules in a special sub folder of your project folder called node_modules. Here you will find the source code for various external libraries that EAK relies upon.

If there is a new package you want to add to the project be sure to use the --save-dev flag to ensure that the module is installed in the local node_modules folder.

npm install MODULE_NAME --save-dev

For example:

  • npm install grunt-cli --save-dev
  • npm install bower --save-dev

Installing NPM packages in your user account without administrator privileges on your system without sudo

Occasionally you might have a need to install certain modules global to your user account outside your project folder. You might want to do this is you have customized your system and bin paths. In some cases you might not want to install packages with administrator privileges. If you would like install node packages like grunt without administrator privileges, e.g. without using sudo then you can change the npm prefix.

npm set prefix ~/npm  

This command will configure npm to install its packages in an npm folder in your home directory owned by your user account. You will need to make sure the bin and lib folders are in your PATH.

PATH=$PATH:$HOME/npm
PATH=$PATH:$HOME/npm/bin
PATH=$PATH:$HOME/npm/lib