Installation Error:: `@uniswap/router-sdk missing`
CodingWithRoyal opened this issue · 1 comments
CodingWithRoyal commented
npm ERR! 404 '@uniswap/router-sdk@https://registry.npmjs.org/@uniswap/router-sdk/-/router-sdk-1.0.0-beta.3.tgz' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
I tried installing it directly from github sudo npm install --save https://github.com/Uniswap/router-sdk.git
but it leads to more errors
lib/cron/cache-pools.ts:1:26 - error TS2307: Cannot find module '@uniswap/router-sdk' or its corresponding type declara tions.
1 import { Protocol } from '@uniswap/router-sdk'
~~~~~~~~~~~~~~~~~~~~~
lib/handlers/quote-to-ratio/quote-to-ratio.ts:2:26 - error TS2307: Cannot find module '@uniswap/router-sdk' or its corr esponding type declarations.
2 import { Protocol } from '@uniswap/router-sdk'
~~~~~~~~~~~~~~~~~~~~~
lib/handlers/quote-to-ratio/quote-to-ratio.ts:215:38 - error TS2339: Property 'pools' does not exist on type 'V3Route | V2Route'.
Property 'pools' does not exist on type 'V2Route'.
215 const pools = subRoute.route.pools
~~~~~
lib/handlers/quote-to-ratio/quote-to-ratio.ts:258:38 - error TS2339: Property 'pairs' does not exist on type 'V3Route | V2Route'.
Property 'pairs' does not exist on type 'V3Route'.
258 const pools = subRoute.route.pairs
~~~~~
lib/handlers/quote/quote.ts:2:26 - error TS2307: Cannot find module '@uniswap/router-sdk' or its corresponding type dec larations.
2 import { Protocol } from '@uniswap/router-sdk'
~~~~~~~~~~~~~~~~~~~~~
lib/handlers/quote/quote.ts:228:38 - error TS2339: Property 'pools' does not exist on type 'V3Route | V2Route'.
Property 'pools' does not exist on type 'V2Route'.
228 const pools = subRoute.route.pools
~~~~~
lib/handlers/quote/quote.ts:271:38 - error TS2339: Property 'pairs' does not exist on type 'V3Route | V2Route'.
Property 'pairs' does not exist on type 'V3Route'.
271 const pools = subRoute.route.pairs
~~~~~
lib/handlers/router-entities/aws-subgraph-provider.ts:1:26 - error TS2307: Cannot find module '@uniswap/router-sdk' or its corresponding type declarations.
1 import { Protocol } from '@uniswap/router-sdk'
~~~~~~~~~~~~~~~~~~~~~
lib/util/pool-cache-key.ts:1:26 - error TS2307: Cannot find module '@uniswap/router-sdk' or its corresponding type decl arations.
1 import { Protocol } from '@uniswap/router-sdk'
~~~~~~~~~~~~~~~~~~~~~
node_modules/@uniswap/smart-order-router/build/main/src/routers/alpha-router/alpha-router.d.ts:1:26 - error TS2307: Can not find module '@uniswap/router-sdk' or its corresponding type declarations.
1 import { Protocol } from '@uniswap/router-sdk';
~~~~~~~~~~~~~~~~~~~~~
node_modules/@uniswap/smart-order-router/build/main/src/routers/alpha-router/entities/route-with-valid-quote.d.ts:1:26 - error TS2307: Cannot find module '@uniswap/router-sdk' or its corresponding type declarations.
1 import { Protocol } from '@uniswap/router-sdk';
~~~~~~~~~~~~~~~~~~~~~
node_modules/@uniswap/smart-order-router/build/main/src/routers/alpha-router/entities/route-with-valid-quote.d.ts:40:25 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum refere nce.
40 readonly protocol = Protocol.V2;
~~~~~~~~~~~
node_modules/@uniswap/smart-order-router/build/main/src/routers/alpha-router/entities/route-with-valid-quote.d.ts:72:25 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum refere nce.
72 readonly protocol = Protocol.V3;
~~~~~~~~~~~
node_modules/@uniswap/smart-order-router/build/main/src/routers/router.d.ts:2:23 - error TS2307: Cannot find module '@u niswap/router-sdk' or its corresponding type declarations.
2 import { Trade } from '@uniswap/router-sdk';
CodingWithRoyal commented
I tried with @emag3m/router-sdk but please UNISWAP add this repo officially too