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

[bug] tsc compiling issue during wrong import path in modal-core #34

Open
mojtabast opened this issue Aug 19, 2024 · 0 comments
Open

[bug] tsc compiling issue during wrong import path in modal-core #34

mojtabast opened this issue Aug 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mojtabast
Copy link

Link to minimal reproducible example

https://github.com/mojtabast/wc-modal-import-issue

Summary

@walletconnect/modal build artifacts has a incorrect import from an absolute path which can not be resolved.

If you take a look at this path @walletconnect/modal/dist/_types/src/client.d.ts you will see an import import("packages/modal-core/dist/_types/src/controllers/ModalCtrl"). it should be @walletconnect/modal-core/dist/_types/src/controllers/ModalCtrl to problem goes away.

there are actually two error in this file. this is the actual error:

node_modules/@walletconnect/modal/dist/_types/src/client.d.ts:12:34 - error TS2307: Cannot find module 'packages/modal-core/dist/_types/src/controllers/ModalCtrl' or its corresponding type declarations.

12     openModal: (options?: import("packages/modal-core/dist/_types/src/controllers/ModalCtrl").OpenOptions | undefined) => Promise<void>;
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@walletconnect/modal/dist/_types/src/client.d.ts:14:50 - error TS2307: Cannot find module 'packages/modal-core/dist/_types/src/types/controllerTypes' or its corresponding type declarations.

14     subscribeModal: (callback: (newState: import("packages/modal-core/dist/_types/src/types/controllerTypes").ModalCtrlState) => void) => () => void;
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/@walletconnect/modal/dist/_types/src/client.d.ts:12

You can test with my repo. It seems other people is facing with same issue as well.

List of related npm package versions

"dependencies": {
"@walletconnect/modal": "2.6.2"
},
"devDependencies": {
"typescript": "5.5.4"
},

@mojtabast mojtabast added the bug Something isn't working label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant