packt-vue-project-guide
packt-vue-project-guide copied to clipboard
chapter5(full) server problem
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
this resolved it for me
- https://stackoverflow.com/questions/34546272/cannot-find-module-bcrypt
- Delete bcrypt from package.json
- npm install (installs all the non bcrypt packages)
- npm install bcryptjs (install bcryptjs inplace of bcrypt)
- Open users.js and change first line to import bcrypt from 'bcryptjs'
- npm start
Test by going to your browser and type in localhost:3000/questions