Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined

I am working with @solana/web3.js & @solana/spl-token but I am getting error

Uncaught ReferenceError: __ VITE_IS_MODERN __ is not defined
at modulepreload-polyfill:43:3

I am not sure which library is causing this.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

My import packages list is here:

import { useState, useEffect, useRef } from "react";

import Select from "react-select";

import "vite/modulepreload-polyfill";

import {Transaction } from "@solana/web3.js";

import { Connection, PublicKey, Keypair, Transaction} from "@solana/web3.js";

import {Token, TOKEN_PROGRAM_ID,ASSOCIATED_TOKEN_PROGRAM_ID, } from "@solana/spl-token";

import bs58 from "bs58";

package.json

package.json

>Solution :

Remove the line

import "vite/modulepreload-polyfill";

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading