Open jayeshbhole opened 1 week ago
@Funkatronics would you mind taking a look at this?
Might be related to https://github.com/solana-mobile/mobile-wallet-adapter/pull/841, you can try to patch the package.json
locally while waiting for npm release.
Describe the bug Hey. I am working on a simple setup to write a package. After importing
@solana-mobile/wallet-adapter-mobile
the following error is thrown while building the projectTo Reproduce Steps to reproduce the behavior:
pnpm v9.4.0
andnode v20.15.0
. I'm using the following configs:module.exports = { root: true, env: { browser: true, es2020: true }, extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'], ignorePatterns: ['dist', '.eslintrc.cjs'], parser: '@typescript-eslint/parser', plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], '@typescript-eslint/no-explicit-any': 'warn', }, };
tsconfig.json
{ "compilerOptions": { "composite": true, "declaration": true, "noEmit": false, "sourceMap": true, "outDir": "dist/_esm", "rootDir": "./src", "module": "NodeNext", "moduleResolution": "NodeNext", "allowJs": false, "allowSyntheticDefaultImports": true, "esModuleInterop": false, "forceConsistentCasingInFileNames": true, "isolatedModules": true, "jsx": "react-jsx", "lib": ["DOM", "DOM.Iterable", "ESNext"], "noFallthroughCasesInSwitch": true, "resolveJsonModule": true, "skipLibCheck": true, "strict": true, "target": "ES2020" }, "include": ["./src//*", "./src/*/.json"], "exclude": ["/.*/", "/build", "/dist", "node_modules", ".yarn"] }
package.json
{ "name": "...", "private": true, "version": "0.0.0", "type": "module", "scripts": { "watch": "tsc -w -p ./tsconfig.json", "build": "tsc --build" }, "dependencies": { "@solana-mobile/wallet-adapter-mobile": "^2.1.3", "@solana/wallet-adapter-base": "^0.9.23", "@solana/wallet-standard-wallet-adapter-react": "^1.1.2", "@solana/web3.js": "^1.91.2", "@tanstack/react-query": "^5.44.0", "react": "^18.2.0", "react-dom": "^18.2.0", "zustand": "^4.5.2" }, "devDependencies": { "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", "prettier-plugin-organize-imports": "^3.2.4", "typescript": "^5.2.2" }, "peerDependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" } }
import { createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler, SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, } from '@solana-mobile/wallet-adapter-mobile';