mosh-hamedani / vidly-api-node

309 stars 285 forks source link

npm i not working coming from React Course #40

Closed shessafridi closed 3 years ago

shessafridi commented 3 years ago

This is the error I get when running npm i, please help

PS I:\Work\Learning React\vidly-api-node> npm i

bcrypt@1.0.3 install I:\Work\Learning React\vidly-api-node\node_modules\bcrypt node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v72-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@12.18.4 (node-v72 ABI) (falling back to source compile with node-gyp) node-pre-gyp ERR! Tried to download(undefined): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v72-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@12.18.4 (node-v72 ABI) (falling back to source compile with node-gyp) gyp ERR! find VS gyp ERR!gyp find VS msvs_version not set from command line or npm config gypERR! ERR!find VS find VSgyp VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR!ERR! find VSfind VS msvs_version not set from command line or npm config could not use PowerShell to find Visual Studio 2017 or newer gypgyp ERR!ERR! find VSfind VS VCINSTALLDIR not set, not running in VS Command Prompt looking for Visual Studio 2015 gypgyp ERR!ERR! find VSfind VS could not use PowerShell to find Visual Studio 2017 or newer

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@1.0.3 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@1.0.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Shess\AppData\Roaming\npm-cache_logs\2020-09-28T20_25_34_844Z-debug.log

mina-kianrad commented 3 years ago

Try this, https://github.com/kelektiv/node.bcrypt.js/issues/432

shessafridi commented 3 years ago

Try this, https://github.com/kelektiv/node.bcrypt.js/issues/432

I fixed it by manually removing bcrypt from package.json and then manually installing it

Arsalon-amini commented 3 years ago

The version of bycrpt Mosh uses in this course has been versioned up and it has created breaking changes. To fix this issue with npm i of bycrpt. Uninstall bycrpt in the terminal or remove from package.json under dependencies. Then run npm i bycrpt and the latest version will be installed in the node modules. This will fix your issues.