I am using vue for solana development.
The library I use is @solana/wallet-adapter
error shows:
/node_modules/@toruslabs/eccrypto/index.js: 'return' outside of function
Since the example is only for React, it's hard for me to find the root cause of the error.
App.vue
<template>
<div id="app">
<WalletConnectButton/>
</div>
</template>
<script>
import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-vue';
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
import {
getLedgerWallet,
getPhantomWallet,
getSlopeWallet,
getSolflareWallet,
getSolletExtensionWallet,
getSolletWallet,
getTorusWallet,
} from '@solana/wallet-adapter-wallets';
import {
WalletDisconnectButton,
WalletMultiButton,
WalletConnectButton
} from '@solana/wallet-adapter-vue-ui';
import { clusterApiUrl } from '@solana/web3.js';
export default {
name: "App",
components: {
}
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Codesandbox
https://codesandbox.io/s/strange-oskar-j1byt?file=/src/App.vue:0-906
Im not sure if this helps or not, but maybe the module is missing.
npm i @toruslabs/eccrypto