Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript throws errors from random packages #12088

Open
Bazhan4ik opened this issue May 6, 2023 · 1 comment
Open

Typescript throws errors from random packages #12088

Bazhan4ik opened this issue May 6, 2023 · 1 comment

Comments

@Bazhan4ik
Copy link

Bazhan4ik commented May 6, 2023

[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!

@KiniaSss
Copy link

[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!

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

No branches or pull requests

2 participants