Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Express Basics Getting Started with Express Creating a Route with Express

Melissa Preece
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Melissa Preece
Full Stack JavaScript Techdegree Graduate 18,394 Points

Can't install nodemon, getting EACCESS err

Hi, I am getting this error and nodemon is not installing successfully on my Mac terminal. Can someone help me please? Thanks!

2 Answers

Harald N
Harald N
15,843 Points

Hi Melissa.

First make sure you have both node.js and npm install, and updated to the latest stable version.

Then try running the npm install nodemon as an administrator:

sudo npm install nodemon

Running the command with sudo gives you admin privileges but require users password. You can add the '-g' flag to make it globally installed on your mac, so each folder containing a project can use nodemon without installing it for each project/folder.

sudo npm install nodemon -g

Hope this helps. If not, try copying the error message, and post it here. Might have more clues about what's going wrong :D

Alex Hort-Francis
Alex Hort-Francis
17,074 Points

I've seen it recommended that you never use sudo to run an npm command, as this grants root access to any node module that is a dependency of your project, which is very dodgy.

I had a problem installing global node packages on my Chromebook with Linux; specifically, trying to run npx commands.

I found that the problem was caused by me trying to install global node packages in a folder shared between ChromeOS and Linux, that was created in ChromeOS. When I used a folder created in Linux I was able to install global packages with npm.

Melissa Preece
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Melissa Preece
Full Stack JavaScript Techdegree Graduate 18,394 Points

Thanks Harald! I installed it as per your advice and was successful. I was just a bit confused by Andrew's instructions on how to install it properly. Thanks for clarifying :D