Skip to content

Can't resolve typechain AGIMigrationWrapAdapter #143

Description

@rootulp

I'm attempting to use master of this package from index-ui via yarn link. I've built set-protocol-v2 successfully. However, when I start the React dev server in index-ui, I observe:

../set-protocol-v2/dist/utils/contracts/index.js
Module not found: Can't resolve '../../typechain/AGIMigrationWrapAdapter' in '/Users/rootulp/git/index-coop/set-protocol-v2/dist/utils/contracts'

It appears the requested file is actually one directory above where it is being searched for in dist.

~/git/index-coop/set-protocol-v2/dist/utils/contracts on master ····················································
❯ ls
aave.js           axieInfinity.js   compound.js       index.js          singularityNet.js uniswapV3.js
aaveV2.js         balancer.js       curve.js          kyberV3.js        uniswap.js        yearn.js

~/git/index-coop/set-protocol-v2/dist/utils/contracts on master ····················································
❯ ls ../../typechain
commons.js factories  index.js

~/git/index-coop/set-protocol-v2/dist/utils/contracts on master ····················································
❯ ls ../../../typechain
AGIMigrationWrapAdapter.d.ts                  IPriceOracle.d.ts
... <rest of output truncated>

However, in the original source, the line that defines this correctly resolves type definitions because set-protocol-v2/typechain/AGIMigrationWrapAdapter.d.ts exists

export { AGIMigrationWrapAdapter } from "../../typechain/AGIMigrationWrapAdapter";

So it looks like something funky is happening in the packaging of dist. Apologizes if this issue only occurs during development time and would go away if I added a dependency on set-protocol-v2 once a release is cut

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions