Trying to install Ember-CLI, unable to find module 'Chalk'

I’ve been trying to install ember cli, but every time I run ember server it gives me an error ‘unable to find module ‘chalk’’. I’m new to ember, node, npm, and bower, just wondering if anyone has thoughts on what I’m doing wrong. Any help is appreciated.

Thanks!

Make sure you’ve installed npm correctly. Best bet is directly off the nodejs.org site. Then…

npm install -g ember-cli
npm install -g bower

Run ember new, or ember init, and/or cd into the project directory.

If you have a bower_components and/or node_components, delete both of them. These are the libraries that the package managers install, so you are having issues, it can be easiest to blow them out and start over.

npm install
bower install

ember s

Go to localhost:4200 and get devin’!

Thanks for the reply! I tried those steps again, and I’m not sure what I’m doing to wrong, but I’m still getting “Cannot find module ‘chalk’” when I run ember serve. I also got this error when trying to run npm install.

EACCES, mkdir '/Users/isaac/.npm/body-parser/1.12.2'

Do I need to do modify package.json or bower.json at all?

That means npm was installed with admin rights (EACCES means that it can’t add that package to your modules folder because it’s admin-only). Try following these instructions for uninstalling.

EDIT: From that file path, I’m guessing you’re on Windows? I’m not sure how you installed node, but you might give these instructions a shot. As for reinstalling, the installer on the main site is probably your best bet.

Thanks! I’m actually on a mac. But appreciate the consideration.

Alright, so now I’ve uninstalled node/npm and reinstalled it. Do I need to be in a specific directory to run npm install -g ember-cli and bower, or can I do it in any directory?

The -g flag means you’re installing it globally (as opposed to for a particular project), so those two commands can be run from anywhere. For npm install and bower install, you’ll want to be in the root directory of your project.