Uncaught SyntaxError: The requested module ‘ModulePath’ does not provide an export named ‘Module’ (at App.jsx:8:9) – Chrome Browser Problem

When I launch my React project in localhost environment by unknown reason it doesn`t load in chrome browser showing up this error in console “Uncaught SyntaxError: The requested module:

/src/pages/Donate.jsx’ does not provide an export named ‘Donate’ (at App.jsx:8:9)

When I cut and paste the import in App.jsx file for Donate.jsx and reload the page the error goes off sending other alert for Home.jsx component (this alert goes for all components AFIK):

 App.jsx?t=1725375166499:30 Uncaught ReferenceError: Home is not defined
 at App (App.jsx?t=1725375166499:30:82)
 at renderWithHooks (chunk-M324AGAM.js?v=5de9e74f:11546:26)
 at mountIndeterminateComponent (chunk-M324AGAM.js?v=5de9e74f:14924:21)
 at beginWork (chunk-M324AGAM.js?v=5de9e74f:15912:22)
 at HTMLUnknownElement.callCallback2 (chunk-M324AGAM.js?v=5de9e74f:3672:22)
 at Object.invokeGuardedCallbackDev (chunk-M324AGAM.js?v=5de9e74f:3697:24)
 at invokeGuardedCallback (chunk-M324AGAM.js?v=5de9e74f:3731:39)
 at beginWork$1 (chunk-M324AGAM.js?v=5de9e74f:19763:15)
 at performUnitOfWork (chunk-M324AGAM.js?v=5de9e74f:19196:20)
 at workLoopSync (chunk-M324AGAM.js?v=5de9e74f:19135:13)

And this only happens in Chrome Browser!

I’m attaching the code, so you can see if is an syntax error (unlikely) in the component itself or the main one App.jsx

Donate.jsx


import React from 'react';

const Donate = () => {

//things

};

export {Donate};


App.jsx

import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import NavBar from './components/Navbar';
import Footer from './components/Footer';
import {Home} from './pages/Home';
import {Media} from './pages/Media';
import {Events} from './pages/Events';
import {Donate}  from './pages/Donate';
import {Rules} from './pages/Rules';
import {Faith} from './pages/Faith';
import 'bootstrap/dist/css/bootstrap.min.css';
const App = () => {
  return (
    <Router>
      <NavBar />
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="media" element={<Media />} />
        <Route path="events" element={<Events />} />
        <Route path="donate" element={<Donate />} />
        <Route path="rules" element={<Rules />} />
        <Route path="faith" element={<Faith />} />
      </Routes>
      <Footer />
    </Router>
  );
};

export default App;

I tried by changing to export default “componentName” from export {componentName}; in the components itself and removing {} if it may be affecting the import recognition but it didn`t change anything.

I tried launching my project (yarn dev command) in Edge, Firefox and there wasn`t any alert. Seems like Chrome has troubles with my export/import of my components by bs reason.

I hope someone can help me on this. Or tell me that it only happens in chrome local environment / if i deploy it on an hosting it wont be an actual issue.

UPD: Apparently this issue can be avoided by disabling the chache in Chrome DevTools/Network and reloading after the page. Anyway if anybody could provide more information ill be grateful.

Problem solved! I had an outdated react version. I updated to latest version the react-router-dom and react-dom, react and the issue is gone.

yarn add react@latest react-dom@latest react-router-dom@latest

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật