PS C:\Users\jawad\OneDrive\Desktop\NFT Project> npm install --save-dev hardhat
npm ERR! code ERR_INVALID_URL
npm ERR! Invalid URL
npm ERR! A complete log of this run can be found in: C:\Users\jawad\AppData\Local\npm-cache\_logs\2023-09-12T21_20_59_996Z-debug-0.log
PS C:\Users\jawad\OneDrive\Desktop\NFT Project>
I encountered an issue while trying to install Hardhat using npm in my Visual Studio Code project. When running the command:
"npm install --save-dev hardhat"
An error message is displayed:
npm ERR! code ERR_INVALID_URL
npm ERR! Invalid URL
npm ERR! A complete log of this run can be found in: C:\Users\jawad\AppData\Local\npm-cache\_logs\2023-09-12T21_20_59_996Z-debug-0.log
Despite attempting various solutions like clearing the npm cache, checking internet connection, and changing npm registry, the issue persists. Can someone help me understand why this error is occurring and how to fix it?
Thank you for your guidance!
I tried to add Hardhat to my Visual Studio Code project by executing the following npm command:
npm install --save-dev hardhat
Here are the steps I took, the expected outcome, and what actually happened:
What I Did: I followed the suggestions provided previously, such as clearing the npm cache, verifying internet connectivity, switching npm registries, and updating npm.
Expected Outcome: I anticipated that the command npm install --save-dev hardhat
would successfully install Hardhat and its dependencies without errors, with a confirmation message indicating successful installation.
Actual Result: Instead, I received the following error message:
npm ERR! code ERR_INVALID_URL
npm ERR! Invalid URL
npm ERR! A complete log of this run can be found in: C:\Users\jawad\AppData\Local\npm-cache\_logs\2023-09-12T21_20_59_996Z-debug-0.log
npm ERR! A complete log of this run can be found in: C:\Users\jawad\AppData\Local\npm-cache\_logs\2023-09-12T21_20_59_996Z-debug-0.log
After troubleshooting with no success, I'm seeking assistance to identify the root cause of this error and find a resolution.