-
Notifications
You must be signed in to change notification settings - Fork 680
TypeScript project fails to build; module 'web3/providers' not found #465
Comments
Alright I have found a solution. It appears these types refer to I will close this issue, but I would suggest making the change I suggested, and removing the dependency on |
Hey @davidmurdoch This issue reappeared with the latest release of This is preventing me from compiling one of my projects, and I couldn't find a workaround so far. I think I could delete |
Hi, is there any update on this issue? I'm having this problem as well. |
Bump on this. |
Fixes issue trufflesuite#465
Hey @davidmurdoch @gnidan I bumped into this issue once again, but this time I can't find a way to workaround it. Have you considered just removing I know that removing the I wouldn't delete the typings folder though, so if someone really wants to use those typings, they can do it by adding them to their Thanks! |
I just realized that they are only broken if you also have a |
Update: I found a workaround. If I don't install @fabioberger this may help you |
I too am hitting this problem. Suggested workaround (from @alcuadrado ) doesn't work for me because I also depend on package.json{
"scripts": {
"install": "sed -ie 's!import { Provider as Web3Provider } from \"web3/providers\";!import { Web3EthereumProvider as Web3Provider } from \"web3-providers\";!' node_modules/ganache-core/typings/index.d.ts"
}
} |
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
See open issue at trufflesuite/ganache#465 (comment)
Any update on this? This has become a notorious issue that several people on my team have independently run into, with no known workaround better than my brutish hack. |
* test: Stop running contract migrations They're already deployed in the snapshot. No need to deploy them again. * Add test of /swap/v0/quote endpoint * Add and use RFQ-T configuration types * yarn clean: separate docker from ts * Only run prettier on ./src To avoid trying to descend into docker-created folders, which are root-access-only when running in a Linux environment. * yarn add --dev make-promises-safe Because it's used (in the mocha invocation) and wasn't present after `yarn install`. * Include prettier in lint * Adapt to new RFQ-T namespace in SwapQuoterOpts * Adapt to new RFQ-T namespace in SwapQuoterReqOpts * Revert addition of env var defs to `yarn dev` Addresses review comment #162 (comment) * Don't enforce presence of taker address Just pass the API key through to the maker. Addresses review comment #162 (comment) * Enforce a specific value for intentOnFilling Addresses review comment #162 (comment) * Remove unused apiKey parameter Addresses review comment #162 (comment) * Add `rfqt:` namespace for RFQ-T specific options Addresses review comment #162 (comment) * Parse RFQT environment variables as CSV, not JSON Addresses review comment #162 (comment) * Set RFQT taker address to Forwarder for ETH sales Addresses review comment #162 (comment) * Restore accidentally deleted line in recent commit. Restoring a line that was accidentally deleted in 2578a79 Addresses review comment 2578a79#r406599327 * Add metadata for dummy kovan tokens * introduce new test using rfqtMocker * TEMPORARY: use gene's ganache snapshot for tests * HACK: fix ganache-core bug See open issue at trufflesuite/ganache#465 (comment) * TEMPORARY: Update gitpkg monorepo references * Enable prettier for {.,test}/**/*.{ts,tsx,json,md} Addresses review comment #162 (comment) * Add SwapQuoteRequestParam `skipValidation` Addresses review comments #162 (comment) and #162 (comment) * Add API Key and `intentOnFilling` to API schema * Parse present but empty intentOnFilling as true * Fix bug: env var csv split was wrongly applied Addresses review comments #162 (comment) and #162 (comment) * RFQT: More tests (#170) * generate source maps * abstract tests out into nested contexts * test for skipping validation * dont include order for maker who does not have allowances set * bad api key test * fix test names and explicitly deposit so taker can fill * Validate bool query params as enum, not presence Addresses the following review comments: - #162 (comment) - #162 (comment) - #162 (comment) * Add comments around using Forwarder as Taker Addresses review comment #162 (comment) * Test no quote provided when taker address absent * Revert "TEMPORARY: Update gitpkg monorepo references" This reverts commit 08f4d31. * Revert "TEMPORARY: use gene's ganache snapshot for tests" This reverts commit 7c448d3. * Pin updated monorepo deps to development revision Pin to a gitpkg publish of the monorepo dependencies changed to support this PR to a commit hash of the development branch, rather than that of my PR branch. * Pin tests' ganache snapshot to monorepo commit I published a custom ganache image, with a monorepo commit hash appended to the version number for reference. * Simplify expressions parsing boolean query params Co-authored-by: Steve Klebanoff <[email protected]>
This worked for me Possible Solution
After
|
Hey all, if you've fixed this please feel free to open a PR and I'll merge it in ASAP! I'll be able to work through the backlog of issues very soon! Edit: looks like I've already got a PR here: #547 I'll see if I can get this in the next update. Sorry for the long wait on this! |
@davidmurdoch the PR #547 still outputs following error: The fix was importing as I have a PR #567 with the fix. |
I had this same error too, but I fixed it by limiting my project's Maybe my bug is not the same as you guys, but I figured someone might google this and want to try this out. // tsconfig.json
{
"include" :["src/**/*.ts"],
"compilerOptions": {
...
}
} |
+1 |
Just ran into this issue as well. Installing |
Closing, fixed by 2f81da2 |
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 packageweb3/providers
, which really should just beweb
. This PR addresses that. I was able to confirm the change solves my problemExpected Behavior
The project should build with no error.
Current Behavior
The project fails to build with
tsc
with the following error:Possible Solution
Before
After
Steps to Reproduce (for bugs)
yarn
to install dependencies (of whichganache-core
is one)yarn build
to build the TypeScript sourceContext
Our project fails to build locally and in CI environments, prohibiting us from continuing to integrate changes into our codebase.
Your Environment
2.7.0
3.5.3
)1.17.3
)The text was updated successfully, but these errors were encountered: