I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isnβt a duplicate
In which of these areas are you experiencing a problem?
App
Expected behavior
shopify app dev works as expected
Actual behavior
shopify app dev fails with error:
Error coming from npm exec react-router dev
Command failed with exit code 1: npm exec react-router dev
failed to load config from
/Users/samt/Documents/Sites/simple-upsell-app3/vite.config.ts
Error [ERR_REQUIRE_ESM]: require() of ES Module
/Users/samt/Documents/Sites/simple-upsell-app3/node_modules/p-map/index.js from
/Users/samt/Documents/Sites/simple-upsell-app3/node_modules/@react-router/dev/di
st/vite.js not supported.
Instead change the require of index.js in /Users/samt/Documents/Sites/simple-ups
ell-app3/node_modules/@react-router/dev/dist/vite.js to a dynamic import() which
is available in all CommonJS modules.
at Object. (/Users/samt/Documents/Sites/simple-upsell-app3/node_m
odules/@react-router/dev/dist/vite.js:62:28) {
code: βERR_REQUIRE_ESMβ
}
Reproduction steps
npm install -g @shopify/cli@latest
shopify app init
β¦ create new React Router Typescript app
cd simple-upsell-app3
shopify app dev
Verbose output
Command failed with exit code 1: npm exec react-router dev
failed to load config from
/Users/samt/Documents/Sites/simple-upsell-app3/vite.config.ts
Error [ERR_REQUIRE_ESM]: require() of ES Module
/Users/samt/Documents/Sites/simple-upsell-app3/node_modules/p-map/index.js from
/Users/samt/Documents/Sites/simple-upsell-app3/node_modules/@react-router/dev/di
st/vite.js not supported.
Instead change the require of index.js in /Users/samt/Documents/Sites/simple-ups
ell-app3/node_modules/@react-router/dev/dist/vite.js to a dynamic import() which
is available in all CommonJS modules.
at Object. (/Users/samt/Documents/Sites/simple-upsell-app3/node_m
odules/@react-router/dev/dist/vite.js:62:28) {
code: βERR_REQUIRE_ESMβ
}
ββ external error ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Error coming from npm exec react-router dev
Command failed with exit code 1: npm exec react-router dev
failed to load config from
/Users/samt/Documents/Sites/simple-upsell-app3/vite.config.ts
Error [ERR_REQUIRE_ESM]: require() of ES Module
/Users/samt/Documents/Sites/simple-upsell-app3/node_modules/p-map/index.js from
/Users/samt/Documents/Sites/simple-upsell-app3/node_modules/@react-router/dev/di
st/vite.js not supported.
Instead change the require of index.js in /Users/samt/Documents/Sites/simple-ups
ell-app3/node_modules/@react-router/dev/dist/vite.js to a dynamic import() which
is available in all CommonJS modules.
at Object. (/Users/samt/Documents/Sites/simple-upsell-app3/node_m
odules/@react-router/dev/dist/vite.js:62:28) {
code: βERR_REQUIRE_ESMβ
}
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2025-10-30T13:22:19.990Z: Running system process:
Β· Command: npm prefix
Β· Working directory: /Users/samt/Documents/Sites/simple-upsell-app3
2025-10-30T13:22:19.997Z: Killing process 2333: /usr/local/lib/node_modules/@shopify/cli/bin/cloudflared tunnel --url http://localhost:50516 --no-autoupdate
2025-10-30T13:22:19.998Z: Killing process 2400: pgrep -lfP 2346
Operating system
Mac OS Sequoia 15.4.1
CLI version
3.86.1
Shell
zsh
Nodejs version
v20.11.1
What language and version are you using in your application?
None yet