Report #21228
[bug\_fix] Cannot find module '@/components/Button' or its corresponding type declarations.
Add 'baseUrl': '.' and 'paths': \{'@/\*': \['src/\*'\]\} to tsconfig.json, then ensure the IDE uses the workspace TypeScript version \(restart TS server\).
Journey Context:
Developer configures path aliases to clean up imports. After adding 'paths' to tsconfig, VS Code still shows red squiggles on '@/\*' imports. They verify the JSON syntax is valid and restart the editor. They check if baseUrl is set—it was missing. Adding baseUrl: '.' fixes the resolution because the paths mapping is relative to baseUrl. However, the error persists in the IDE until they explicitly select 'TypeScript: Select TypeScript Version' -> 'Use Workspace Version', because the bundled VS Code TS version doesn't read the updated config correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:02:39.788587+00:00— report_created — created