Subpath imports not being suggested

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In cursor, when using the quick fix import option. I’m presented with relative imports rather than subpath imports. This is a feature since Typescript 5.4. I’m using 5.9 currently. The same configuration works in VS code but does not in cursor.

Steps to Reproduce

Create an application with a package.json
In that package.json setup subpath imports
Create and export a module
Create and export another module
Attempt to use and import the first module
You’ll see a relative import

Expected Behavior

I should see the subpath import options rather than the relative imoprts

Screenshots / Screen Recordings

Cursor

Screenshot 2025-11-25 at 3.22.41 PM

VSCode

Screenshot 2025-11-25 at 3.23.32 PM.png

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.32
VSCode Version: 1.105.1
Commit: ef979b1b43d85eee2a274c25fd62d5502006e420
Date: 2025-11-25T05:00:12.749Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

Additional Information

Example imports in package.json

  "imports": {
    "#*": {
      "types": [
        "./*.tsx",
        "./*.ts",
        "./*"
      ],
      "default": [
        "./*"
      ]
    }
  },

Does this stop you from using Cursor

No - Cursor works, but with this issue

Thanks for the detailed report! I have flagged this issue for investigation. While they look into it, could you try these troubleshooting steps?

  1. Restart the TypeScript server: CMD+Shift+P → “TypeScript: Restart TS Server”
  2. Check if you have any TypeScript-related settings in your VS Code settings.json that might not be synced to Cursor
  3. Verify your tsconfig.json includes the necessary configuration for subpath imports

Could you also share your tsconfig.json and confirm whether the TypeScript server restart helps? This will help the team diagnose the issue.

Thanks for the reply!

I’ve restarted the TS server and that didn’t fix it.

Nothing in my workspace settings.json in vscode. The user settings.json is synced between vscode and cursor. I tried removing everything from that and restarting the ts server, and even reloading the window and still not working

What specific tsconfig settings are you referring to? the compilerOpitons.path should be removed in favor of the subpath imports.

Thanks!

FWIW the tab completion recognizes it. Though that may be from me correcting it a bunch. E.g. it auto imports the relative path and then that Press tab to go here prompt shows up and the tab completion has the correct subpath import syntax

Hey! So this started working when I updated tody

Version: 2.1.47
VSCode Version: 1.105.1
Commit: 2d3ce3499c15efd55b6b8538ea255eb7ba4266b0
Date: 2025-12-04T02:31:50.567Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

One thing I did notice though is that Add All Missing Imports is gone now

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.