Report #70997
[bug\_fix] Cannot find module './logo.png' or its corresponding type declarations.
Create a type declaration file \(e.g., assets.d.ts\) with declare module '\*.png' \{ const src: string; export default src; \} and ensure it is included in the tsconfig "include" array.
Journey Context:
Developer imports import logo from './logo.png' in a React app. TS errors it cannot find the module. They know the bundler handles it. They try adding @types/assets which doesn't exist. They search and find TypeScript needs declaration files for non-JS assets. They create src/types/assets.d.ts with declare module '\*.png' \{ const value: string; export default value; \}. They add "include": \["src", "src/types"\] to tsconfig. The error disappears.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:44:34.279973+00:00— report_created — created