Cannot Find Module while creating a shopify app

Topic summary

Issue: Multiple developers encounter a “Cannot Find Module” error when creating Shopify apps using the CLI, specifically with Remix template. The error occurs immediately after scaffolding without any code modifications.

Root Cause: The problem stems from path alias configuration in tsconfig.json. Import statements using the ~ character (e.g., import prisma from "~/db.server") are not being recognized properly.

Workaround Found: Replace the ~ path alias with relative paths (. or ..) based on file location. For example:

  • Change import prisma from "~/db.server" to import prisma from "./db.server"
  • Adjust according to each file’s directory structure

This manual replacement resolves the module resolution errors. The discussion includes screenshots showing the error messages and project structure. The issue appears to affect the default Shopify CLI scaffolding process, suggesting a potential configuration problem with the generated template.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

I used the shopify cli to create the app (remix), I haven’t even touched the file and it is showing me this error. As far as I know I dont kneed to connect to a db if i use the shopify cli to create a app