error: @solana/wallet-adapter-base has no MessageSignerWalletAdapter
hlolli opened this issue · 10 comments
node_modules/arbundles/src/signing/chains/injectedSolanaSigner.d.ts(3,10): error TS2305: Module '"@solana/wallet-adapter-base"' has no exported member 'MessageSignerWalletAdapter'.
arbundles v0.6.21
|_ @solana/wallet-adapter-base v0.9.12
Looking into this
I'm unable to reproduce this error with our demo application (both it and arbundles force upgraded to that version) - and looking at the types from that version the type it says is missing is in fact present - is there some example application you can provide to me so I can investigate this further?
yes, I apologise incomplete bug report, I realised later that to reproduce this, two things are needed
"type": "module"
needs to be present in package.json
and (maybe) this tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "node16",
"outDir": "dist",
"sourceMap": true,
"esModuleInterop": true,
"moduleResolution": "node16"
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
}
I'll add that I was able to "fix" the issue by adding "skipLibCheck": true,
to my tsconfig, but that's a big hammer, and in my case, arbundles is the only library failing. If you can't reproduce, I'll happy make a repository later this week, no problem :)
okay, I can replicate the issue but I'm not entirely sure how to solve it - it seems this is an issue more with the solana lib as opposed to arbundles itself - as a side note, a fix I found was changing the moduleResolution to just "node" instead of "node16"
Is this a suitable resolution for you @hlolli ?
no, node16 is currently the same as esnext afaict, it's compilation for .mjs module support. So I'm specifically not using .cjs whenever possible. Did you try updating the solana package?
If this is persistent issue with the solana library, it may be easier to fork it and fix until they fix it upstream. But I think the world is heading to module based javascript, so it's an issue down the road one way or another, so I don't think it's a smart idea to find workarounds based on not using modules.
If this is persistent issue with the solana library, it may be easier to fork it and fix until they fix it upstream. But I think the world is heading to module based javascript, so it's an issue down the road one way or another, so I don't think it's a smart idea to find workarounds based on not using modules.
I agree - thing is I'm not sure what the actual issue is, so forking won't help...
if you have any ideas as to the root cause that'd be fab, if not perhaps an issue on their GH would be in order
@hlolli we're now shipping ESM-native builds - does the latest version of arbundles still have this issue?
@JesseTheRobot this issue seems to be resolved now in the latest release, safe to close!