I am running npm run dev to start my react server, however i get this error all the time [vite] Internal server error: Cannot redefine property: File Plugin: vite:react-babel File: /Users/moshoodbello/Coding/NEA/frontend/src/main.jsx at Function.defineProperty (<anonymous>) at Object.<anonymous> (/Users/moshoodbello/Coding/NEA/frontend/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> (/Users/moshoodbello/Coding/NEA/frontend/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14) at Module._compile (node:internal/modules/cjs/loader:1241:14)
Another thing that might be of help is that a similar problem occurred with astro, I would've assumed this was an issue with astro but it then happened to react so i assume that this might be a vite issue?
Describe the bug
I am running
npm run dev
to start my react server, however i get this error all the time[vite] Internal server error: Cannot redefine property: File Plugin: vite:react-babel File: /Users/moshoodbello/Coding/NEA/frontend/src/main.jsx at Function.defineProperty (<anonymous>) at Object.<anonymous> (/Users/moshoodbello/Coding/NEA/frontend/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> (/Users/moshoodbello/Coding/NEA/frontend/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14) at Module._compile (node:internal/modules/cjs/loader:1241:14)
Another thing that might be of help is that a similar problem occurred with astro, I would've assumed this was an issue with astro but it then happened to react so i assume that this might be a vite issue?Reproduction
/
Steps to reproduce
I Run
npm run dev
System Info
Used Package Manager
npm
Logs
Plugin: vite:react-babel File: /Users/moshoodbello/Coding/NEA/frontend/src/main.jsx at Function.defineProperty ()
at Object. (/Users/moshoodbello/Coding/NEA/frontend/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. (/Users/moshoodbello/Coding/NEA/frontend/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
vite:time 27.31ms /src/main.jsx +243ms
vite:load 22.26ms [fs] /@vite/client +6ms
vite:resolve 1.54ms @vite/env -> /Users/moshoodbello/Coding/NEA/frontend/node_modules/vite/dist/client/env.mjs +33ms
vite:import-analysis 8.88ms [1 imports rewritten] node_modules/vite/dist/client/client.mjs +0ms
vite:transform 13.29ms /@vite/client +0ms
vite:time 38.32ms /@vite/client +16ms
vite:load 2.80ms [fs] /node_modules/vite/dist/client/env.mjs +16ms
vite:import-analysis 0.07ms [no imports] node_modules/vite/dist/client/env.mjs +3ms
vite:transform 0.58ms /node_modules/vite/dist/client/env.mjs +2ms
vite:import-analysis 0.85ms [0 imports rewritten] /@react-refresh +3ms
vite:transform 39.91ms /@react-refresh +3ms
vite:time 41.79ms /@react-refresh +6ms
vite:cache [304] /node_modules/vite/dist/client/env.mjs +0ms
vite:time 0.44ms /node_modules/vite/dist/client/env.mjs +11ms
Validations