-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Attempted import error: 'WalletPluginScatter' is not exported #2
Comments
@DenisCarriere What does your import look like? I think we're currently moving away from default exports to only providing named exports, and I'm wondering if that's the issue here. |
Here is our import, we're not using default exports import { Chains } from "@wharfkit/common"
import { SessionKit } from "@wharfkit/session"
import { WebRenderer } from "@wharfkit/web-renderer"
import { WalletPluginAnchor } from "@wharfkit/wallet-plugin-anchor"
import { WalletPluginCleos } from "@wharfkit/wallet-plugin-cleos"
import { WalletPluginScatter } from "@wharfkit/wallet-plugin-scatter"
import { WalletPluginWombat } from "@wharfkit/wallet-plugin-wombat"
import { WalletPluginTokenPocket } from "@wharfkit/wallet-plugin-tokenpocket"
import { TransactPluginResourceProvider } from "@wharfkit/transact-plugin-resource-provider";
import { TransactPluginCosigner } from "@wharfkit/transact-plugin-cosigner";
const cosigner = new TransactPluginCosigner({
actor: 'cpu.pomelo',
permission: 'cosign',
privateKey: 'PVT_K1_...',
contract: 'cpu.pomelo',
action: 'noop',
})
export function generateKit() {
return new SessionKit({
appName: "work.pomelo",
chains: [Chains.EOS],
ui: new WebRenderer(),
walletPlugins: [
new WalletPluginAnchor(),
new WalletPluginWombat(),
new WalletPluginTokenPocket(),
new WalletPluginScatter(),
new WalletPluginCleos(),
],
}, {
transactPlugins: [cosigner],
});
} tsconfig.json {
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": ".",
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": ["node_modules"]
} |
Alright I'm seeing the same error in a sample nextjs app I just setup - but its still working? When I click the "login" button in the example app, it pops up and Scatter/TokenPocket/Wombat all appear as options and actually work. I do see the warning in the console though.
I dug through the node_modules code and those are being exported properly, and just like Anchor. I also went through and tested these 3 plugins against Svelte, SvelteKit, and Vue - and didn't see the same issue. So I think this is actually an issue with SWC (the compiler Next uses) and I'm not entirely sure how to resolve this yet. |
Yes it still works, but throws these errors in As for resolving it, the This works => https://github.com/wharfkit/wallet-plugin-anchor/blob/master/rollup.config.js |
Looks like some rollup build issue, the
wallet-plugin-anchor
seems to work fine, but all other plugins not.Some rollup imports missing
❌ error
The text was updated successfully, but these errors were encountered: