Skip to content

Unable to compile Typescript when npm run start #21

@yuyasugano

Description

@yuyasugano

I embedded environmental variables in .env and ran npm run start. Here's the error I encountered "Unable to compile TypeScript". Is there any defects in the current code?? Thanks.

$ npm run start
> @flashbots/[email protected] start /home/ether/work/javascript/simple-arbitrage
> npx ts-node --project tsconfig.json src/index.ts

? Unable to compile TypeScript:
src/index.ts:56:49 - error TS2339: Property 'getUniswapMarketsByToken' does not exist on type 'typeof UniswappyV2EthPair'.

56   const markets: any = await UniswappyV2EthPair.getUniswapMarketsByToken(provider, FACTORY_ADDRESSES);
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:58:30 - error TS2339: Property 'updateReserves' does not exist on type 'typeof UniswappyV2EthPair'.

58     await UniswappyV2EthPair.updateReserves(provider, markets.allMarketPairs);
                                ~~~~~~~~~~~~~~

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @flashbots/[email protected] start: `npx ts-node --project tsconfig.json src/index.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @flashbots/[email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/.npm/_logs/2021-08-09T05_29_01_383Z-debug.log

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