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 npm Basics (retiring) Installing Packages with npm Installing Local Packages

Where can I get package.json for this tutorial?

When I install bcrypt there is only package-lock.json

I was asking for help for another question and the moderator mentioned I don't have the package.json file, but I don't recall it being provided and it didn't download for me on npm install

Thanks to anyone who can help!

2 Answers

Zack Lee
PLUS
Zack Lee
Courses Plus Student 17,662 Points

Package.json is created when you initiate your npm modules. Just run

npm init

From the cli and it should build your package.json automatically.

Edward Pledger
Edward Pledger
2,757 Points

They should probably mention this in the tutorial for those of us that like to follow along on our own computer and not the provided Workspace. Was hoping somebody had asked this same question already.

word- completely sympathize as I also ran into this issue. I think it's safe to always begin your node packages with npm init and then install any additional package as you see fit.