简体   繁体   中英

I am unable to install bcrypt using npm install. I am able to download every other package except bcrypt . Why is it so?

PS

C:\Users\saalik\Desktop\JS\task manager> npm install --save bcrypt       
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/bcrypt failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\saalik\AppData\Roaming\npm-cache\_logs\2020-07-10T17_07_33_971Z-debug.log

this happens usually because of older version of npm or node, you can read more about this here

https://github.com/npm/npm/issues/16728

Solution

You can resolve this by updating your current npm version by

npm install -g npm@latest

take a look here for more about npm update

and then

npm i bcrypt --save

hope this will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM