Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vite - "Source map points to missing source files"

Tags:

reactjs

vite

All of a sudden I'm getting this error for practically all modules installed.

Sourcemap for "C:/.../node_modules/.vite/react.js" points to missing source files Sourcemap for "C:/.../node_modules/.vite/axios.js" points to missing source files Sourcemap for "C:/.../node_modules/.vite/react-dom.js" points to missing source files Sourcemap for "C:/.../node_modules/.vite//react_jsx-dev-runtime.js" points to missing source files

package.json:

{
  "name": "ic-logistic",
  "version": "0.0.0",
    "proxy": "http://localhost:8080/",
  "private": true,
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  "dependencies": {
    "axios": "^0.24.0",
    "dotenv": "^10.0.0",
    "mapbox-gl": "^2.5.0",
    "react": "^17.0.0",
    "react-dom": "^17.0.0",
    "react-map-gl": "^6.1.17",
    "react-redux": "^7.2.5",
    "react-router-dom": "^5.3.0",
    "redux": "^4.1.1",
    "redux-devtools-extension": "^2.13.9",
    "sass": "^1.42.1"
  },
  "devDependencies": {
    "@vitejs/plugin-react": "^1.0.0",
    "vite": "^2.6.0"
  }
}
like image 276
Daniel Tkach Avatar asked Jun 26 '26 20:06

Daniel Tkach


1 Answers

Just change @vitejs/plugin-react version from "^1.0.0" to exact version "1.0.5". You can read more about this error in this thread: https://github.com/vitejs/vite/issues/5438

like image 125
Nefaris Avatar answered Jun 28 '26 14:06

Nefaris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!