bitpay/wallet

Typescript throws errors from random packages

Bazhan4ik opened this issue · 1 comments

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6 
            '{' or ';' expected.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...azha/work/crypto/wallet/node_modules/bitcore-wallet-client/ts_build/lib/key.d.ts, line: 3
            Invalid character.

       L2:  export declare class Key {
       L3:      #private;
       L4:      id: any;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Cannot find name 'import'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Property 'OperatingSystem' does not exist on type '"detect-browser"'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Property 'Platform' does not exist on type 'typeof NodeJS'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;        
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Object is possibly 'undefined'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

...and much more.

I just fixed errors with installing packages and here we go again.

nodejs: 10.16.2
npm: 7.24.2

Here's what I did:

npm install
npm run env:dev
npm run apply:bitpay
npm run start

and I get those errors above.
If you know how to fix this, kindly share the solution. Thanks!

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6 
            '{' or ';' expected.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...azha/work/crypto/wallet/node_modules/bitcore-wallet-client/ts_build/lib/key.d.ts, line: 3
            Invalid character.

       L2:  export declare class Key {
       L3:      #private;
       L4:      id: any;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Cannot find name 'import'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Property 'OperatingSystem' does not exist on type '"detect-browser"'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Property 'Platform' does not exist on type 'typeof NodeJS'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;        
       L7:  export declare function isIOS(): boolean;

[15:40:29]  typescript: ...rk/crypto/wallet/node_modules/@walletconnect/browser-utils/dist/cjs/browser.d.ts, line: 6
            Object is possibly 'undefined'.

       L5:  export declare function detectOS(): import("detect-browser").OperatingSystem | NodeJS.Platform | undefined;
       L6:  export declare function isAndroid(): boolean;
       L7:  export declare function isIOS(): boolean;

...and much more.

I just fixed errors with installing packages and here we go again.

nodejs: 10.16.2 npm: 7.24.2

Here's what I did:

npm install
npm run env:dev
npm run apply:bitpay
npm run start

and I get those errors above. If you know how to fix this, kindly share the solution. Thanks!