Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error HH604 in Hardhat: "The specified module could not be found" on Windows #6079

Closed
bferreirarocha opened this issue Dec 26, 2024 · 3 comments
Assignees
Labels
status:needs-more-info There's not enough information to start working on this issue

Comments

@bferreirarocha
Copy link

Version of Hardhat

2.22.17

What happened?

I'm encountering an issue when running npx hardhat node on my Windows machine. After setting up a new Hardhat project, attempting to start the node results in the following error:

Error HH604: Error running JSON-RPC server: The specified module could not be found.
\\?\C:\test\node_modules\@nomicfoundation\edr-win32-x64-msvc\edr.win32-x64-msvc.node

For more info go to https://hardhat.org/HH604 or run Hardhat with --show-stack-traces

Minimal reproduction steps

Steps I've Taken:

Enabled Long Paths in Windows:

Modified the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled and set it to 1.
Restarted the computer to apply changes.
Updated Node.js:

Upgraded to the latest Node.js 18.x LTS version.
Created a New Hardhat Project:

Initialized a new project using npx hardhat in an empty directory.
Installed Hardhat Locally:

Ran npm install --save-dev hardhat to ensure Hardhat is installed as a development dependency.
Reinstalled Project Dependencies:

Deleted node_modules and package-lock.json.
Executed npm install to reinstall dependencies.
Checked for Detailed Error Logs:

Executed npx hardhat node --show-stack-traces to obtain more information, but the same error persists without additional insights.
Environment Details:

Operating System: Windows 10
Node.js Version: 18.x LTS
Hardhat Version: 2.22.17

Search terms

No response

@schaable
Copy link
Member

schaable commented Jan 9, 2025

Hi @bferreirarocha, I’ve tried reproducing your issue on my Windows 11 laptop but wasn’t able to replicate it. Could you provide any additional insights? For example:

  1. are you running the command in PowerShell?
  2. which version of Windows 10 are you using?
  3. Can you verify that \\?\C:\test\node_modules\@nomicfoundation\edr-win32-x64-msvc\edr.win32-x64-msvc.node exists?
  4. Also, I know it’s not the same environment, but have you tried using WSL to see if the issue persists there?
  5. Anything else you consider relevant.

@schaable schaable added status:needs-more-info There's not enough information to start working on this issue and removed status:triaging labels Jan 9, 2025
@schaable
Copy link
Member

schaable commented Jan 9, 2025

@bferreirarocha, could you try running echo %PROCESSOR_ARCHITECTURE% in CMD or $env:PROCESSOR_ARCHITECTURE in PowerShell? This will output your processor architecture, which might be relevant for debugging the issue.

@schaable schaable assigned kanej and unassigned schaable Feb 21, 2025
@kanej
Copy link
Member

kanej commented Feb 24, 2025

I am going to close this. If there is more information we can re-open.

@kanej kanej closed this as completed Feb 24, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-more-info There's not enough information to start working on this issue
Projects
Status: Done
Development

No branches or pull requests

4 participants