Error installing bcrypt with npm

后端 未结 17 2211
别那么骄傲
别那么骄傲 2020-11-27 14:20

I\'m unable to install bcrypt using npm on my machine because I encounter the following errors. I have been troubleshooting the issue without much luck. Can you

相关标签:
17条回答
  • 2020-11-27 14:58

    I was also having the same problem. The following commands helped me.

    npm rebuild
    

    then

    npm install bcrypt
    
    0 讨论(0)
  • 2020-11-27 14:58

    I managed to solve this by running the command: sudo apt-get install -y build-essential python and then yarn add bcrypt.

    You can find the instructions here:

    https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions

    https://github.com/kelektiv/node.bcrypt.js

    0 讨论(0)
  • 2020-11-27 14:58

    Running

    sudo apt install build-essential
    

    installs all the tools you need to install bcrypt on Linux. Then you can run

    npm install
    
    0 讨论(0)
  • 2020-11-27 14:59

    On Mac OS, after a Xcode update, running sudo gcc and accepting Xcode's new license solved the problem!

    0 讨论(0)
  • 2020-11-27 14:59

    Had the same problem. Updating npm and try again (npm install -g npm usually). It fix the issue for me.

    0 讨论(0)
  • 2020-11-27 15:03

    If you are on windows run powershell as administrator and use these commands.

    npm install --g --production windows-build-tools
    

    and then install bcrypt using

    npm install --save bcrypt
    
    0 讨论(0)
提交回复
热议问题