Cannot find module 'bcrypt'

前端 未结 30 3271
轻奢々
轻奢々 2020-12-24 01:54

I am getting error Cannot find module \'bcrypt\' in nodejs application

I have tried to install it using npm install bcrypt but still gett

30条回答
  •  青春惊慌失措
    2020-12-24 02:54

    First check node-modules folder for a folder with this name bcrypt. If it exists with another name just rename it; for example bcrypt-pbkdf must be edited to bcrypt. If there isn't such a folder, do this in cmd:

    npm install node-gyp -g
    # bcrypt reqired node-pre-gyp
    npm install -g node-pre-gyp
    npm install bcrypt -g
    npm install bcrypt --save
    

提交回复
热议问题