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 triallearning67learning67
6,479 PointsError message when installing bcrypt locally
MDee:~ sharifi$ npm install bcrypt
> bcrypt@2.0.1 install /Users/sharifi/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
[bcrypt] Success: "/Users/sharifi/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
npm WARN saveError ENOENT: no such file or directory, open '/Users/sharifi/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/sharifi/package.json'
npm WARN sharifi No description
npm WARN sharifi No repository field.
npm WARN sharifi No README data
npm WARN sharifi No license field.
+ bcrypt@2.0.1
added 69 packages in 7.046s
MDee:~ sharifi$ npm install bcrypt
> bcrypt@2.0.1 install /Users/sharifi/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
[bcrypt] Success: "/Users/sharifi/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
npm WARN saveError ENOENT: no such file or directory, open '/Users/sharifi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/sharifi/package.json'
npm WARN sharifi No description
npm WARN sharifi No repository field.
npm WARN sharifi No README data
npm WARN sharifi No license field.
+ bcrypt@2.0.1
updated 1 package in 4.168s
1 Answer
Adam Beer
11,314 PointsCreate a package.json file with "npm init". Check this link. I think you can install it now. Hope this help.
learning67learning67
6,479 Pointslearning67learning67
6,479 PointsThanks Adam. it worked.