Cannot Find Module while creating a shopify app.

Topic summary

Recurring “Cannot find module” errors after generating a Shopify app with the CLI. Multiple users report the issue and suspect a recent CLI environment/setup bug.

Recent updates and workarounds:

  • Path alias fix: Replace imports using the “~/” alias with relative paths. Example: change import { authenticate } from "~/shopify.server"; to import { authenticate } from "../shopify.server";. Needs updating in several files. This resolved the error for at least one user. (“~” is a path alias; the problem appears to be alias resolution.)
  • OS workaround: Running the app on Linux worked for one user, suggesting environment-specific behavior.

Status:

  • No official fix or confirmation from Shopify yet. The issue likely relates to path alias handling in the current CLI template.
  • Discussion remains open; users are implementing the above workarounds.

Notes: Attached screenshots show the error output but are not required to understand the issue.

Summarized with AI on December 19. AI used: gpt-5.

Couldn’t find any solutions yet. What about you? How are you working on the app now?