Skip to content

Conversation

MichaelDeBoey
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Jul 24, 2025

⚠️ No Changeset found

Latest commit: 7507c5f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@MichaelDeBoey MichaelDeBoey force-pushed the update-mjackson-packages-to-remix-run branch from eb78570 to 2df9d31 Compare July 25, 2025 22:16
@brophdawg11
Copy link
Contributor

It looks like we have some CJS/ESM incompatibilities with the new packages?

@MichaelDeBoey MichaelDeBoey force-pushed the update-mjackson-packages-to-remix-run branch from 2df9d31 to 1c1af3e Compare August 4, 2025 21:50
@MichaelDeBoey MichaelDeBoey force-pushed the update-mjackson-packages-to-remix-run branch from 1c1af3e to a7a2238 Compare August 26, 2025 20:06
@brophdawg11 brophdawg11 removed their request for review September 11, 2025 14:01
@alexandrsashin
Copy link

Should update @remix-run/node-fetch-server. The latest version is 0.9.0.

@MichaelDeBoey MichaelDeBoey force-pushed the update-mjackson-packages-to-remix-run branch from a7a2238 to 24e9076 Compare October 4, 2025 22:48
@MichaelDeBoey MichaelDeBoey force-pushed the update-mjackson-packages-to-remix-run branch from 24e9076 to 7507c5f Compare October 4, 2025 23:03
@MichaelDeBoey
Copy link
Member Author

@brophdawg11 It indeed seems like we have some CJS/ESM issues here, but can't really find out the actual problem 🤔

@alexandrsashin
Copy link

packages/react-router-node is being built as CommonJS, but we are importing ESM-only modules (@remix-run/node-fetch-server) using static imports. TypeScript (TS1479) throws an error, and tsup fails during DTS generation.

The solution is to migrate the packages/react-router-node package to ESM:
add "type": "module" to package.json, and update both the tsconfig and tsup configurations.

@alexandrsashin
Copy link

Minimal changes:
package.json

"type": "module",

tsconfig.json (I recommend to delete any comments from json)

{
  "include": ["**/*.ts"],
  "exclude": ["dist", "__tests__", "node_modules"],
  "compilerOptions": {
    "lib": ["DOM", "DOM.Iterable", "ES2022"],
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "strict": true,
    "jsx": "react",
    "declaration": true,
    "rootDir": ".",
    "outDir": "./dist",
    "noEmit": true,
    "resolveJsonModule": true,
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,

    "skipLibCheck": true
  }
}

@MichaelDeBoey
Copy link
Member Author

@alexandrsashin that would technically be a breaking change I guess, so I'll wait for @brophdawg11 and the rest of the team to decide what we want to do with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants