Skip to content

Fix TSConfig configuration issues after RemixJS to React Router v7 migrationΒ #11

@jdnichollsc

Description

@jdnichollsc

Problem

After migrating RemixJS to React Router v7 and adding new improvements to this monorepo, the TSConfig configuration is causing build and runtime issues across different applications.

Current Issues

NestJS Apps

  • Webpack is compiling successfully
  • Services are not initialized correctly at runtime

RemixJS App (now React Router v7)

Getting module resolution errors when starting the development server:

> react-router dev

The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
  ➜  Local:   http://localhost:4200/
  ➜  press h + enter to show help
/*! 🌼 daisyUI 5.0.43 */
3:17:00 PM [vite] (ssr) Error when evaluating SSR module virtual:react-router/server-build: Cannot find module '@projectx/core/lib/logger/logger' imported from '/Users/jdnichollsc/dev/proyecto26/projectx/apps/web/app/services/logger.server.ts'
      at fetchModule (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:46813:19)
      at RunnableDevEnvironment.fetchModule (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxK
3:17:00 PM [vite] Internal server error: Cannot find module '@projectx/core/lib/logger/logger' imported from '/Users/jdnichollsc/dev/proyecto26/projectx/apps/web/app/services/logger.server.ts'
      at fetchModule (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:46813:19)
      at RunnableDevEnvironment.fetchModule (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxK
XgDP.js:47904:12)
      at fetchModule (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:47858:21)
      at handleInvoke (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:38973:28)
      at EventEmitter.listenerForInvokeHandler (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-D
BxKXgDP.js:39046:25)
      at EventEmitter.emit (node:events:514:28)
      at Object.send (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:25190:40)
      at Object.invoke (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/module-runner.js:621:34)
      at Object.invoke (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/module-runner.js:682:34)
      at SSRCompatModuleRunner.getModuleInformation (file:///Users/jdnichollsc/dev/proyecto26/projectx/node_modules/vite/dist/node/module-
runner.js:1205:94)

Root Cause

The issue appears to be related to module path resolution in the monorepo setup. The error shows that the system cannot find @projectx/core/lib/logger/logger module, suggesting that the TSConfig path mapping or module resolution is not working correctly after the migration.

Action Items

  • Review TSConfig configuration in branch 8/fix-migrate-remixjs-to-react-router-v7
  • Fix module path resolution for monorepo packages
  • Ensure NestJS services initialize correctly
  • Test React Router v7 app starts without module resolution errors
  • Verify build processes work across all applications

Branch

8/fix-migrate-remixjs-to-react-router-v7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions