dethcrypto / dethcrypto/TypeChain

.ts files cannot resolve typings

Open
#710 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.8k
Forks
376
PR merge metrics
No merged PRs in 30d

Description

If I run `npx hardhat clean` followed by `npx hardhat test` I receive the following:

```bash
% npx hardhat test
Generating typings for: 60 artifacts in dir: ./types for target: ethers-v5
Successfully generated 85 typings!
Compiled 55 Solidity files successfully
An unexpected error occurred:

test/A.test.ts:8:8 - error TS2307: Cannot find module './../../types' or its corresponding type declarations.

8 } from "./../../types";
~~~~~~~~~~~~~~~

% npx hardhat test
No need to generate any newer typings.
```

Upon running `npx hardhat test` the first time it appears that the typings are generated but the `.ts` cannot resolve them before executing. When I run `npx hardhat test` for the second time the tests run without a hitch.

Similarly, if I run `npx hardhat clean`, `npx hardhat typechain`, `npx hardhat test` manually I have no issues.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.