-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Reproduction
- Create an
.mjs
file with some js - Import like you normally would import something, like
import MyModule from "./my-module";
- See it throws an error. "Cannot find module"
System Info
System:
OS: macOS 14.7.1
CPU: (12) arm64 Apple M2 Max
Memory: 2.62 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.7.0 - ~/.nvm/versions/node/v23.7.0/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v23.7.0/bin/npm
pnpm: 9.15.3 - ~/.nvm/versions/node/v23.7.0/bin/pnpm
bun: 1.0.25 - ~/.bun/bin/bun
Browsers:
Chrome: 135.0.7049.116
Safari: 18.1
npmPackages:
@remix-run/dev: ^2.16.5 => 2.16.5
@remix-run/node: ^2.16.5 => 2.16.5
@remix-run/react: ^2.16.5 => 2.16.5
@remix-run/serve: ^2.16.5 => 2.16.5
vite: ^6.0.0 => 6.3.4
Used Package Manager
pnpm
Expected Behavior
Remix should import .mjs
files if it won't find a .js
file.
Actual Behavior
Throws error: "Cannot find module"