You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
As of a few days ago, a TypeScript project I am working on suddenly started failing, reporting an issue originating from node_modules/ganache-core/typings/index.d.ts (see full error below).
The issue appears to be the typings/index.d.ts file imports some types from package web3/providers, which really should just be web. This PR addresses that. I was able to confirm the change solves my problem
Expected Behavior
The project should build with no error.
Current Behavior
The project fails to build with tsc with the following error:
$ tsc
node_modules/ganache-core/typings/index.d.ts:2:44 - error TS2307: Cannot find module 'web3/providers'.
2 import { Provider as Web3Provider } from "web3/providers";
~~~~~~~~~~~~~~~~
Found 1 error.
Possible Solution
Before
// from typings/index.d.tsdeclare module "ganache-core"{import{ProviderasWeb3Provider}from"web3/providers";namespaceGanache{exportinterfaceIProviderOptions{// ...
After
// from typings/index.d.tsdeclare module "ganache-core"{import{ProviderasWeb3Provider}from"web3";namespaceGanache{exportinterfaceIProviderOptions{// ...