Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

BigNumber import Issue while running yarn build #252

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

viraj124
Copy link

@viraj124 viraj124 commented Sep 7, 2020

No description provided.

@levity
Copy link
Contributor

levity commented Sep 9, 2020

Hmm--BigNumber should come from the bignumber.js library, not our code. What is the error that you see without this change?

@viraj124
Copy link
Author

viraj124 commented Sep 9, 2020

Error
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:98:25 - error TS2304: Cannot find name 'BigNumber'.
98 liquidationPenalty: BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:108:16 - error TS2304: Cannot find name 'BigNumber'.
108 debtFloor: BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:135:25 - error TS2304: Cannot find name 'BigNumber'.
135 liquidationPenalty: BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:140:28 - error TS2304: Cannot find name 'BigNumber'.
140 priceWithSafetyMargin: BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:145:16 - error TS2304: Cannot find name 'BigNumber'.
145 debtFloor: BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:157:52 - error TS2304: Cannot find name 'BigNumber'.
157 debtScalingFactor(collateralTypeName: string): BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:162:56 - error TS2304: Cannot find name 'BigNumber'.
162 priceWithSafetyMargin(collateralTypeName: string): BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:172:44 - error TS2304: Cannot find name 'BigNumber'.
172 debtFloor(collateralTypeName: string): BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:192:8 - error TS2304: Cannot find name 'BigNumber'.
192 ): BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:201:8 - error TS2304: Cannot find name 'BigNumber'.
201 ): BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:210:8 - error TS2304: Cannot find name 'BigNumber'.
210 ): BigNumber;
~~~~~~~~~
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:235:52 - error TS2304: Cannot find name 'BigNumber'.
235 maxAuctionLotSize(collateralTypeName: string): BigNumber;
~~~~~~~~~

@viraj124
Copy link
Author

viraj124 commented Sep 9, 2020

while running yarn build without this

@viraj124
Copy link
Author

viraj124 commented Sep 9, 2020

Hmm--BigNumber should come from the bignumber.js library, not our code. What is the error that you see without this change?

ideally yes, but not sure why it doesn't pick from there

@kushkamisha
Copy link

Error
node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:98:25 - error TS2304: Cannot find name 'BigNumber'.
98 liquidationPenalty: BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:108:16 - error TS2304: Cannot find name 'BigNumber'.
108 debtFloor: BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:135:25 - error TS2304: Cannot find name 'BigNumber'.
135 liquidationPenalty: BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:140:28 - error TS2304: Cannot find name 'BigNumber'.
140 priceWithSafetyMargin: BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:145:16 - error TS2304: Cannot find name 'BigNumber'.
145 debtFloor: BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:157:52 - error TS2304: Cannot find name 'BigNumber'.
157 debtScalingFactor(collateralTypeName: string): BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:162:56 - error TS2304: Cannot find name 'BigNumber'.
162 priceWithSafetyMargin(collateralTypeName: string): BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:172:44 - error TS2304: Cannot find name 'BigNumber'.
172 debtFloor(collateralTypeName: string): BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:192:8 - error TS2304: Cannot find name 'BigNumber'.
192 ): BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:201:8 - error TS2304: Cannot find name 'BigNumber'.
201 ): BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:210:8 - error TS2304: Cannot find name 'BigNumber'.
210 ): BigNumber;

node_modules/@makerdao/dai-plugin-mcd/typings/multicall.d.ts:235:52 - error TS2304: Cannot find name 'BigNumber'.
235 maxAuctionLotSize(collateralTypeName: string): BigNumber;

I have the same problem. Both importing BigNumber from 'bignumber.js' or declaring a BigNumber interface works for me to solve this problem. However, it may be better to import from 'bignumber.js' as it should go from there. Though this is a purely ts error.

Copy link

@kushkamisha kushkamisha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the issue

@viraj124
Copy link
Author

viraj124 commented Apr 2, 2021

will this come under some sort of bug bounty if this get's merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants