packt-vue-project-guide icon indicating copy to clipboard operation
packt-vue-project-guide copied to clipboard

chapter5(full) server problem

Open azcvcza opened this issue 6 years ago • 2 comments

when in /server folder run 'npm install' make occur 'bcrypt' unfound problem, I try to modify 'bcrypt' => 'bcryptjs' in package.json, and modify user.js(/server/src/connectors/user.js) 'import "bcrypt" from 'bcrypt'' => 'import "bcrypt" from 'bcryptjs'' finally 'npm start' success; node version v10.13.0 npm version 6.4.1 platform win10 x64

azcvcza avatar Nov 30 '18 05:11 azcvcza

this resolved it for me

  • https://stackoverflow.com/questions/34546272/cannot-find-module-bcrypt

chiubaca avatar Oct 25 '19 07:10 chiubaca

  1. Delete bcrypt from package.json
  2. npm install (installs all the non bcrypt packages)
  3. npm install bcryptjs (install bcryptjs inplace of bcrypt)
  4. Open users.js and change first line to import bcrypt from 'bcryptjs'
  5. npm start

Test by going to your browser and type in localhost:3000/questions

ehidetake avatar Dec 17 '19 05:12 ehidetake