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 Introducing the Practice

PROLESM RUNIING npm i in my terminal

when i run npm i in my terminal i get a response that there is no such directory or file .

1 Answer

Rachel Johnson
Rachel Johnson
Treehouse Teacher

Hi lord kenu , thanks for sharing your question to the forum.

It's always a little tricky to pinpoint exactly what's happening without seeing your terminal or folder structure, so be sure to include those (and as much information as you can) when posting to the forums! However, I do believe I can provide some general tips.

Usually, a "No such file or directory" error from running npm i is because there is no package.json file present in the directory that the terminal is currently in. After all, npm i installs the packages listed in package.json, so it will throw an error if there is no package.json.

Make sure that you've already downloaded the project folder and opened it up in your IDE or text editor. Then, make sure that the terminal or console is in the directory of that project. A good way to check if you are in the correct directory is to list the files of that directory. If you see package.json as one of the files, then you're good to go!