Getting Error "Uncaught Error: Cannot find module '/imports/ui/app'"

I have an app currently deployed on the free tier, for testing purposes.

The app works fine on localhost, but upon deploying it to the server, the app shows a blank page, even though it is successfully deployed. There is an error in the console that says:

Uncaught Error: Cannot find module '/imports/ui/app'

This app uses react-router 6. Here is the main.jsx excerpt of the corresponding line:

...
import App from '/imports/ui/app';
import Dashboard from '/imports/ui/dashboard';
...

Meteor.startup(() => {
  
  Tracker.autorun(() => {
    const routes = (
      <>
      <Router>
        <CurrentUserProfileProvider>
          <Routes>
            <Route path='/' element={<React.Suspense fallback={<>...</>}> <App /> </React.Suspense>} />
            <Route element={<ProtectedRoutes/>}>
              <Route path='/verify' element={<React.Suspense fallback={<>...</>}> <Verify/> </React.Suspense>} />
              <Route path='/dashboard' element={<React.Suspense fallback={<>...</>}> <Dashboard /> </React.Suspense>} />
            </Route>
          </Routes>
        </CurrentUserProfileProvider>
      </Router>
      </>
    );
    render(routes, document.getElementById('target'));
  });
});

I’ve tried several forms of path e.g. "../imports/ui/app" and ../imports/ui/app.js but still on the deployed server, the same error occurs. Has anybody encountered a similar problem? Or is there something that I missed here? I’m new to React Router 6 and still trying to figure it out. Appreciate any kind of help I can get here.