Each time i try install the following packages multer-storage-cloudinary,bcrypt, cloudinary i get the error below : i have tried uninstalling node and cleaning caches but none is workin
PS C:UsersUserDocumentsCommerceApiapi> npm install –save multer-storage-cloudinary
npm warn deprecated [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers
strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone
for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm error code ERR_INVALID_ARG_TYPE
npm error The "file" argument must be of type string. Received undefined
npm error A complete log of this run can be found in: C:UsersUserAppDataLocalnpm-cache_logs2025-01-10T03_36_27_845Z-debug-0.log
Question posted in Javascript
A very good W3school tutorial can be found here.
A very good W3school tutorial can be found here.
2
Answers
It seems there was an issue with the npm installation command. Let’s break down the problem and provide a solution.
Here’s what we can do to resolve this issue:
package.json
file is located.package.json
file to ensure there are no conflicts or issues with existing dependencies.Make sure you’re using a version that’s compatible with the package you’re trying to install.
If you’re still encountering issues after trying these steps, please provide the contents of your
package.json
file and the full error log. This will help in diagnosing the problem more accurately.number one: make sure you use latest versions of node and npm.
number two: install each package separately to find out which one causes the error and then troubleshoot from there.
Also clear npm cache as you do the above steps
What you can also do is delete your node_modules folder and start over by installing one package at a time