I am trying to run a code, this code is hosted in vite server for react framework and for javascript language. it was working fine while ago, but i don't know what happened suddenly, now after i run the code it shows Code language not supported or defined. the code here is a basic one, to just print "Hi there" using react (https://i.stack.imgur.com/fWDBF.png) (I am so sorry i cannot directly upload the image as i dont have 10 reputations!) The error it shows is
failed to load config from C:\Users\HP\Desktop\Todo app\The-todo-app\vite.config.js
error when starting dev server:
TypeError: Cannot redefine property: File
at Function.defineProperty (<anonymous>)
at Object.<anonymous> (C:\Users\HP\Desktop\Todo app\The-todo-app\node_modules\@babel\core\lib\index.js:7:8)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (C:\Users\HP\Desktop\Todo app\The-todo-app\node_modules\@babel\core\lib\config\helpers\config-api.js:16:14)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
My config file looks something like this
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
what should i do?
I tried running the .jsx file on the cmd itself still didn't work i just want it to run on the server after i press the run button!
The error message "Code language not supported or defined" suggests that the code you are trying to run is not written in a language that is supported by the environment in which you are trying to run it.
Create a new file called server.js and add the following code: