Node package installation failure

I am trying to install the packages from “vidly-api-node” folder provided in Mosh’s “Mastering React” course but I am getting some warnings/errors which inlcude:
“core-js@2.5.3: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.”
“node-pre-gyp@0.6.36: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated bson@1.0.4: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see CVE - CVE-2019-2391 for more details”
“npm ERR! code 1
npm ERR! path C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\node_modules\bcrypt
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.
npm ERR!
npm ERR!
npm ERR! C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\node_modules\bcrypt\src\ : fatal error C1083: Cannot open compiler generated file: ‘C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\node_modules\bcrypt\build\Release\obj\bcrypt_lib\src\blowfish.obj’: Permission denied [C:\Users\Hasne\Desktop\unimelb\july_2019\web development(udemy)\html\react\Section 6- Routing_windows\start\vidly-api-node\node_modules\bcrypt\build\bcrypt_lib.vcxproj]”
Is there a way to update the packages using any command or any help on how to handle this issue would be highly appreciated. Thanks.

So brother all I understand from your question is that you have outdated packages of npm and you wanna update them to the latest.
so there will be a few disadvantages of it that there might be a possibility that you will have multiple errors after the update because there would be a few functions that would be removed on the latest version or have been updated with the newer name.
To update the packages →

  1. npm i -g npm-check-updates
  2. npm-check-updates
  3. ncu -u
  4. npm install

that’s it and all your outdated packages will be updated to the latest version.
"Happy Coding :slight_smile: "

1 Like

I tried the steps above, this didn’t fix the problem. npm install doesn’t work on the vidly-api-node

I would recommend initializing a new node project with npm init and building a similar beginning package with updated dependencies.

Thanks Abbas! this fixed my issue. You’re the best :slight_smile: