Skip to content

[remix] Cannot find module 'remix-router-dom' #5860

Closed
@joelazar

Description

@joelazar

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/remix

SDK Version

7.14.0

Framework Version

Remix 1.7.2

Link to Sentry event

No response

Steps to Reproduce

In a monorepo setup, loading the react-router-dom is not working when the node server is built for production. I've made a small example repo for reproducing the bug.
Also, I've added a README.md for describing the reproducing steps.

As far as I can see, this might be caused by PR 5810.

Expected Result

The server should serve the incoming request without any error.

Actual Result

❯ yarn dev
[0] npm WARN ignoring workspace config at /home/joelazar/git/joelazar/sentry-indie-stack/myapp/.npmrc 
[0] 
[0] > generate:css
[0] > tailwindcss -o ./app/styles/tailwind.css --watch
[0] 
[1] Express server listening on port 3000
[0] 
[0] Rebuilding...
[0] Done in 192ms.
[1] Error: Cannot find module '/home/joelazar/git/joelazar/sentry-indie-stack/myapp/node_modules/react-router-dom'
[1] Require stack:
[1] - /home/joelazar/git/joelazar/sentry-indie-stack/myapp/build/server.js
[1]     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
[1]     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
[1]     at Module.require (node:internal/modules/cjs/loader:1005:19)
[1]     at require (node:internal/modules/cjs/helpers:102:18)
[1]     at /home/joelazar/git/joelazar/sentry-indie-stack/myapp/build/server.js:30185:52
[1]     at /home/joelazar/git/joelazar/sentry-indie-stack/myapp/build/server.js:30185:17
[1] yarn dev:remix exited with code 1
--> Sending SIGTERM to other processes..
[0] yarn dev:css exited with code 1

Metadata

Metadata

Assignees

Labels

Package: remixIssues related to the Sentry Remix SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions