WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.8k stars 1.35k forks source link

[bug] Unable to function properly in Angular 18 #2616

Closed Jacky-Young1123 closed 1 month ago

Jacky-Young1123 commented 1 month ago

Link to minimal reproducible example

https://stackblitz.com/edit/stackblitz-starters-xspw8z?file=src%2Fmain.ts

Summary

When developing with the Angular 18 framework, I found that I couldn't use the package @web3modal/solana properly.

List of related npm package versions

{ "name": "angular-starter", "private": true, "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build" }, "dependencies": { "@angular/animations": "^18.0.0", "@angular/common": "^18.0.0", "@angular/compiler": "^18.0.0", "@angular/core": "^18.0.0", "@angular/forms": "^18.0.0", "@angular/platform-browser": "^18.0.0", "@angular/router": "^18.0.0", "@web3modal/solana": "^5.0.7", "rxjs": "^7.8.1", "tslib": "^2.5.0", "zone.js": "~0.14.0" }, "devDependencies": { "@angular-devkit/build-angular": "^18.0.0", "@angular/cli": "^18.0.1", "@angular/compiler-cli": "^18.0.0", "typescript": "~5.4.0" } }

vanyasav commented 1 month ago

This works fine for Angular:

"@wagmi/connectors": "5.0.16",
"@wagmi/core": "2.11.4",
"@web3modal/wagmi": "5.0.3",
Jacky-Young1123 commented 1 month ago

这对于 Angular 来说很好用:

"@wagmi/connectors": "5.0.16",
"@wagmi/core": "2.11.4",
"@web3modal/wagmi": "5.0.3",

I need to use walletconnect in the solana chain, your method is not applicable.

rtomas commented 1 month ago

Console log

TS2307: Cannot find module '@web3modal/ui/src/utils/TypeUtil.js' or its corresponding type declarations. [plugin angular-compiler]

    node_modules/.pnpm/@web3modal+scaffold-ui@5.0.11_react@18.3.1/node_modules/@web3modal/scaffold-ui/dist/types/src/partials/w3m-onramp-activity-item/index.d.ts:2:31:
      2 │ import type { ColorType } from '@web3modal/ui/src/utils/TypeUtil.js';
        ╵                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glitch-txs commented 1 month ago

Hey could you run

npm ls @web3modal/ui

And share what's on console?

Jacky-Young1123 commented 1 month ago

嘿,你能跑吗

npm ls @web3modal/ui

并分享控制台上的内容?

image

glitch-txs commented 1 month ago

We fixed it here, we be fixed in the next release 🙏

cc @enesozturk