Dev preview never loads in complex app with multiple imports and extensions

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

The app preview of a complex app with a lot of extensions loads fast - as it always did.

Actual behavior

The app preview of a complex app with a lot of extensions takes minutes to load or sometimes it doesn’t load at all, it freezes.

I’ve pinpointed the issue to this change in November as of 3.87.0, if the extensions are now all watching for changes in imported files, it means the watching strategy is not optimal enough for large apps, if the extensions import intricate files that are used in the repository, it seems to hog the app preview process by a lot, many times just freezing and not continuing.

This can be considered a breaking change for large apps such as ours, we have to conform to 3.86.1 for now while this issue is fixed, otherwise we can’t use a CLI version to develop.

Reproduction steps

  1. Have a complex app that has a lot of extensions, shared code outside of the extensions folder that is imported by the extensions and also the app.
  2. Run the dev server preview.
  3. See that it takes ages to load or sometimes it just freezes.

Verbose output


11:59 AM  npm run dev -- --verbose                                                                                                                                                                                               
npm verbose cli C:\nvm4w\nodejs\node.exe C:\nvm4w\nodejs\node_modules\npm\bin\npm-cli.js                                                                                                                                          
npm info using npm@11.5.2
npm info using node@v20.17.0
npm warn Unknown project config "auto-install-peers". This will stop working in the next major version of npm.
npm warn Unknown project config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown project config "enable-pre-post-scripts". This will stop working in the next major version of npm.
npm verbose title npm run dev
npm verbose argv "run" "dev" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:C:\Users\xxxxxxxxxx\AppData\Local\npm-cache\_logs\2026-01-13T16_59_20_960Z-
npm verbose logfile C:\Users\xxxxxxxxxx\AppData\Local\npm-cache\_logs\2026-01-13T16_59_20_960Z-debug-0.log

> hubble@1.0.0 predev
> npx prisma generate --no-hints

npm verbose cli C:\nvm4w\nodejs\node.exe C:\Users\xxxxxxxxxx\AppData\Local\nvm\v20.17.0\node_modules\npm\bin\npm-cli.js
npm info using npm@11.5.2
npm info using node@v20.17.0
npm warn Unknown env config "auto-install-peers". This will stop working in the next major version of npm.
npm warn Unknown env config "enable-pre-post-scripts". This will stop working in the next major version of npm.
npm warn Unknown env config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown project config "auto-install-peers". This will stop working in the next major version of npm.
npm warn Unknown project config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown project config "enable-pre-post-scripts". This will stop working in the next major version of npm.
npm verbose title npm exec prisma generate --no-hints
npm verbose argv "exec" "--" "prisma" "generate" "--no-hints"
npm verbose logfile logs-max:10 dir:C:\Users\xxxxxxxxxx\AppData\Local\npm-cache\_logs\2026-01-13T16_59_21_259Z-
npm verbose logfile C:\Users\xxxxxxxxxx\AppData\Local\npm-cache\_logs\2026-01-13T16_59_21_259Z-debug-0.log
Loaded Prisma config from prisma.config.ts.

Prisma config detected, skipping environment variable loading.
Prisma schema loaded from prisma\schema

✔ Generated Prisma Client (v6.16.3) to .\node_modules\@prisma\client in 382ms

✔ Generated Prisma Enum Generator to .\app\constants\prisma-enums.ts in 138ms

✔ Generated Prisma Json Types Generator (3.2.2) to .\prisma\schema in 1.93s

npm verbose cwd C:\toRelocate\Projects\Overse\Shopify\hubble
npm verbose os Windows_NT 10.0.26200
npm verbose node v20.17.0
npm verbose npm  v11.5.2
npm verbose exit 0
npm info ok

> hubble@1.0.0 dev
> shopify app dev

╭─ info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                    │
│  Using shopify.app.xxxxxxxxxx.toml for default values:                                                                                             │
│                                                                                                                                                    │
│    • Org:             xxxxxx                                                                                                                       │
│    • App:             xxxxxxxxxx                                                                                                                   │
│    • Dev store:       xxxxxxxxxxxxxxxxxxxxxx.myshopify.com                                                                                         │
│    • Update URLs:     Not yet configured                                                                                                           │
│                                                                                                                                                    │
│   You can pass `--reset` to your command to reset your app configuration.                                                                          │
│                                                                                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

?  Have Shopify override your app URLs when running `app dev` against your dev store? This won't affect your app on other stores:
✔  Yes, automatically update

11:59:54 │               app-preview │ Preparing app preview on xxxxxxxxxxxxxxxxxxxxxx.myshopify.com
11:59:54 │                  graphiql │ GraphiQL server started on port 3457
11:59:54 │                     proxy │ Proxy server started on port 52474
11:59:55 │                     remix │ npm verbose cli C:\nvm4w\nodejs\node.exe C:\Users\xxxxxxxxxx\AppData\Local\nvm\v20.17.0\node_modules\npm\bin\npm-cli.js
11:59:55 │                     remix │ npm info using npm@11.5.2
11:59:55 │                     remix │ npm info using node@v20.17.0
11:59:55 │                     remix │ npm warn Unknown env config "auto-install-peers". This will stop working in the next major version of npm.
11:59:55 │                     remix │ npm warn Unknown env config "enable-pre-post-scripts". This will stop working in the next major version of npm.
11:59:55 │                     remix │ npm warn Unknown env config "shamefully-hoist". This will stop working in the next major version of npm.
11:59:55 │                     remix │ npm warn Unknown project config "auto-install-peers". This will stop working in the next major version of npm.
11:59:55 │                     remix │ npm warn Unknown project config "shamefully-hoist". This will stop working in the next major version of npm.
11:59:55 │                     remix │ npm warn Unknown project config "enable-pre-post-scripts". This will stop working in the next major version of npm.
11:59:55 │                     remix │ npm verbose title npm exec prisma migrate deploy
11:59:55 │                     remix │ npm verbose argv "exec" "--" "prisma" "migrate" "deploy"
11:59:55 │                     remix │ npm verbose logfile logs-max:10 dir:C:\Users\xxxxxxxxxx\AppData\Local\npm-cache\_logs\2026-01-13T16_59_55_090Z-
11:59:55 │                     remix │ npm verbose logfile C:\Users\xxxxxxxxxx\AppData\Local\npm-cache\_logs\2026-01-13T16_59_55_090Z-debug-0.log
11:59:55 │   xxxxxxxxxxxxxxxxxxxxxxx │ Build successful
11:59:55 │       xxxxxxxxxxxxxxxxxxx │ Build successful
11:59:55 │               xxxxxxxxxxx │ Build successful
11:59:55 │         xxxxxxxxxxxxxxxxx │ Build successful
11:59:55 │                xxxxxxxxxx │ Build successful
11:59:55 │       xxxxxxxxxxxxxxxxxxx │ Build successful
11:59:55 │     xxxxxxxxxxxxxxxxxxxxx │ Build successful                                                                                                                                                                           
11:59:55 │                 xxxxxxxxx │ Build successful
11:59:56 │               xxxxxxxxxxx │ Build successful                                                                                                                                                                           
11:59:56 │                 xxxxxxxxx │ Build successful
11:59:56 │          xxxxxxxxxxxxxxxx │ Build successful                                                                                                                                                                           
11:59:56 │            xxxxxxxxxxxxxx │ Build successful

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ (d) Dev status │ (a) App info │ (s) Store info │                                                                                                                                                 (q) Quit

 ⠼ Preparing app preview

It just stays in the Preparing app preview for a loong time and most of the time it just freezes there forever.

Operating system

Windows 11

CLI version

3.88.1 - Issue pinpointed as far back as → 3.87.0 - high suspect change here

Shell

Powershell

Nodejs version

20.17.0

What language and version are you using in your application?

Shopify’s App Remix Template

Hi!
Have you tried configuring the following setting in your TOML file?

[build]
automatically_update_urls_on_dev = true

Hi @Raisel_Castellanos_S, how’s that relevant to the post in question?

Hi. I’m sorry you are facing this issue. When we implemented that feature, we tested with a bunch of extensions, but maybe not enough.

Could you please detail the number of extensions and the types? Do they have too many shared imports or something? It would be very useful to try to reproduce and fix it.

Hi @gonzaloriestra, thank you for the reply!

We’ve got:

  • x1 - ui_extension - Admin extension
  • x1 - editor_extension_collection - Collection extension
  • x9 - ui_extension - Customer Account Extensions

We’ve got a monorepo as such:

  • extensions/ - imports from shared, extensions.src and some app stuff.
  • extensions.src/
  • app/
  • shared/

Our repo has multiple configured tsconfig.ts to allow for all this shared code.

If necessary I can give you more details privately how you prefer!

Thanks for the explanation, it will be very useful. Let me try to reproduce.

1 Like

Hi there @gonzaloriestra Let me know if you need any more info for reproducing!

1 Like

Hi @gonzaloriestra, any updates on this?

Hi! Sorry, I added this to the backlog, but didn’t get prioritized…

But I’ve just tried with quick solution to add a cache that I think it should help in your case. Could you try with npm i -g @shopify/cli@0.0.0-snapshot-20260303123133?

If it doesn’t work, I also added a new environment variable you can add to completely disable this feature: SHOPIFY_CLI_DISABLE_IMPORT_SCANNING=1. If you add it, then changes in your shared folders won’t be automatically detected, but it should load fast.

I hope it helps and sorry for the delay!

1 Like

Thank you @gonzaloriestra ! Will try and reach back with results

@gonzaloriestra

On 1st run, it takes a long time still to run (2-3 min), but still runs after some time.
On 2nd run, it takes just a bit less time (I imagine is the cache change) but still takes around 2-2:30min.

Thanks a lot for your help. The cache only works for the command duration, so I’m afraid it didn’t help too much.

I’ve prepared another snapshot with more caching and debug logs to try to understand what’s happening in your case. Could you please try with@shopify/cli@0.0.0-snapshot-20260304084414 and share the output of shopify app dev --verbose? You can send it by email if you prefer (I’ll share it privately).

Also, have you tried with SHOPIFY_CLI_DISABLE_IMPORT_SCANNING=1? Is it fast with that? Just to ensure this problem is related to the imports detection.

@muchisx were you able to test it? Thanks!

Hi @gonzaloriestra yes! apologies for the delay, I’ve sent you an email now!

1 Like

Thanks a lot! After analyzing your logs, I think the problem is that you have some very big files (types) and it takes too long to find imports there in Windows. I’ve prepared one more snapshot where we only check the first 128KB for each file, that should be enough: npm i -g @shopify/cli@0.0.0-snapshot-20260316101807

Could you give it a try? Thanks!

Awesome @gonzaloriestra , will test it today!

Wondering though if another approach could be have an exclude pattern to avoid scanning some files, just a thought!

@gonzaloriestra Reporting here that this is definitely faster! Spin up was normal

1 Like

Great, thanks for testing it! I’ll prepare a PR then

1 Like