You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot read properties of undefined (reading 'prototype')
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/@metaplex-foundation_umi-bundle-defaults.js?v=eaf4a82e:2834:78
but when im using this minimal setup (directly from @metaplex-foundation/umi) is working
import { createUmi, type RpcInterface, type Umi } from '@metaplex-foundation/umi'
import { mplTokenMetadata } from '@metaplex-foundation/mpl-token-metadata'
import { mplBubblegum } from '@metaplex-foundation/mpl-bubblegum'
import { dasApi, type DasApiInterface } from "@metaplex-foundation/digital-asset-standard-api"
import { web3JsRpc } from '@metaplex-foundation/umi-rpc-web3js'
import { defaultProgramRepository } from '@metaplex-foundation/umi-program-repository'
const umi = createUmi()
.use(defaultProgramRepository())
.use(web3JsRpc(this.options.rpc))
.use(mplTokenMetadata())
.use(mplBubblegum())
.use(dasApi())
I managed to solve all my issues with this config:
importreactfrom'@vitejs/plugin-react-swc';import{defineConfig}from'vite';import{nodePolyfills}from'vite-plugin-node-polyfills';importtopLevelAwaitfrom'vite-plugin-top-level-await';importwasmfrom'vite-plugin-wasm';importpathfrom'path';// https://vitejs.dev/config/exportdefaultdefineConfig({plugins: [react(),wasm(),// Ignore, this is for my projecttopLevelAwait(),// This is for my project toonodePolyfills({// Whether to polyfill specific Node.js modules in the browserprotocolImports: true,}),],resolve: {alias: {'@': path.resolve(__dirname,'src'),// Not neededstream: 'stream-browserify',// This fixes the prototype thing},},define: {global: 'globalThis',// This fixes an issue with globals and stuff},});
this error :
but when im using this minimal setup (directly from @metaplex-foundation/umi) is working
my nuxt config :
The text was updated successfully, but these errors were encountered: