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

Docker containers says You are not inside a Hardhat project #6231

Closed
yegor256 opened this issue Feb 6, 2025 · 1 comment
Closed

Docker containers says You are not inside a Hardhat project #6231

yegor256 opened this issue Feb 6, 2025 · 1 comment
Assignees

Comments

@yegor256
Copy link

yegor256 commented Feb 6, 2025

This is my Dockerfile:

FROM node:22
WORKDIR /app
EXPOSE 8545
COPY . hardhat.config.ts
RUN npm install -g hardhat

This is hardhat.config.ts in the same directory and I don't have any other files here:

module.exports = {
  solidity: "0.8.28",
};

Then, I run npm install -g [email protected] on the host machine. Then, I run npx hardhat node in this directory, on the host machine, it works correctly.

However, when I do docker build . -t hh first and then docker run hh npx hardhat node, I'm getting this:

Error HH1: You are not inside a Hardhat project.

Why? How to fix?

@yegor256
Copy link
Author

yegor256 commented Feb 7, 2025

It was a bug in my Dockerfile

@yegor256 yegor256 closed this as completed Feb 7, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants