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

[Sui Code Bug] Wallet adapter & ui cannot be imported properly following the docs. #4482

Closed
bruceeewong opened this issue Sep 5, 2022 · 5 comments · Fixed by #4636
Closed

Comments

@bruceeewong
Copy link
Contributor

Steps to Reproduce Issue

I am trying to integrate SUI wallet adapter into my demo vite Reac-ts project (created straightly from vite CLI).

Following the instruction of the Main Branch wallet adater docs and installed all the three deps:

npm i @mysten/wallet-adapter-all-wallets @mysten/wallet-adapter-react @mysten/wallet-adapter-react-ui

npm deps show like these:

"@mysten/wallet-adapter-all-wallets": "^0.0.0-experimental-20220822221301",
"@mysten/wallet-adapter-react": "^0.0.0-experimental-20220825172556",
"@mysten/wallet-adapter-react-ui": "^0.0.0-experimental-20220825172556",

I followed what the docs saied to import the packages, several errors poped up:

import { SuiWalletAdapter } from "@mysten/wallet-adapter-all-wallets";
// error: TS2305: Module '"@mysten/wallet-adapter-all-wallets"' has no exported member 'SuiWalletAdapter'.
import { WalletWrapper } from '@mysten/wallet-adapter-react-ui';
TS2307: Cannot find module '@mysten/wallet-adapter-react-ui' or its corresponding type declarations.

Expected Result

Expect all the imports work and be available to use in my react project.

Actual Result

Got serveral import issues from packages:

  • @mysten/wallet-adapter-all-wallets
  • @mysten/wallet-adapter-react-ui

System Information

  • OS: MacOS 12.3.1
  • Compiler: "vite": "^3.1.0"
@flappys
Copy link

flappys commented Sep 6, 2022

Go to package.json, add "@testing-library/dom": "^7.21.4" and "@babel/core": "^7.0.0".
Remove all modules having workspace
Go to tsconfig.json add packages include. Also remove "integrations" from all paths

use pnpm install

@bruceeewong
Copy link
Contributor Author

Go to package.json, add "@testing-library/dom": "^7.21.4" and "@babel/core": "^7.0.0". Remove all modules having workspace Go to tsconfig.json add packages include. Also remove "integrations" from all paths

use pnpm install

Thanks for the reply. I am not playing with the sui repo actually. I am using the npm package as external users. Maybe it should be the publish problem of the offical sui npm packages.

@bruceeewong
Copy link
Contributor Author

Go to package.json, add "@testing-library/dom": "^7.21.4" and "@babel/core": "^7.0.0". Remove all modules having workspace Go to tsconfig.json add packages include. Also remove "integrations" from all paths

use pnpm install

Your instruction works for developing the official repo, thanks!

@Jordan-Mysten
Copy link
Contributor

Jordan-Mysten commented Sep 9, 2022

@bruceeewong Can you try installing the versions with the @experimental tag to get the latest experimental versions of the packages? I believe those should have this issue resolved.

@Jordan-Mysten
Copy link
Contributor

@bruceeewong Just following up before I close this, does using the @experimental versions resolve the issue?

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

Successfully merging a pull request may close this issue.

3 participants