typescript-go
typescript-go copied to clipboard
Paths with parenthesis cause the vscode extension to not understand import parths
if I have this import
import { Button } from '@/components/ui/button'
Then it works fine in the file
'app/page.tsx'
app/hello/page.tsx
etc
However, if I have
app/(test)/test/page.tsx
I get an error "Cannot find module"
Here is screenshot.
@typescript/native-preview: "7.0.0-dev.20250523.1",
Ext Version: 0.20250523.1
+1 this is a major problem in nextjs
Do you have a repo we could test?
Here you go @jakebailey
https://github.com/mikerudge/tsgo-error-example
Thanks. The issue here is that in the editor, the file is not being considered part of the project, so is instead being treated as an "inferred" file without a tsconfig.
Info 19 [10:46:18.440] Open files:
Info 19 [10:46:18.440] FileName: /home/jabaile/tsgo932/app/hello/page.tsx ProjectRootPath:
Info 19 [10:46:18.440] Projects: /home/jabaile/tsgo932/tsconfig.json
Info 19 [10:46:18.440] FileName: /home/jabaile/tsgo932/app/%28test%29/comp/comp-test.tsx ProjectRootPath:
Info 19 [10:46:18.440] Projects: /dev/null/inferredProject1*
Info 19 [10:46:18.440] Starting updateGraph: Project: /home/jabaile/tsgo932/tsconfig.json
Info 20 [10:46:18.440] Program 2 used 1 checker(s)
Which I suspect is due to us not unescaping the URI.