JavaScript npm Basics Installing Packages with npm Installing Local Packages

Joseph Bertino
seal-mask
.a{fill-rule:evenodd;}techdegree
Joseph Bertino
Full Stack JavaScript Techdegree Student 9,882 Points

No such file '/home/treehouse/workspace/package.json'

I am unable to install bcrypt on Workspaces. Here is my attempt at running the command, and the resulting error:

treehouse:~/workspace$ npm install bcryptjs                                                                                                               
npm WARN saveError ENOENT: no such file or directory, open '/home/treehouse/workspace/package.json'                                                       
npm WARN enoent ENOENT: no such file or directory, open '/home/treehouse/workspace/package.json'                                                          
npm WARN workspace No description                                                                                                                         
npm WARN workspace No repository field.                                                                                                                   
npm WARN workspace No README data                                                                                                                         
npm WARN workspace No license field.
Joseph Bertino
seal-mask
.a{fill-rule:evenodd;}techdegree
Joseph Bertino
Full Stack JavaScript Techdegree Student 9,882 Points

Based on reading another very similar question, a solution (not explained in the video) is to first run npm init in the console, then hitting Enter through all the prompts to generate a packages.json file. After doing that, installing a module with npm worked for me!