Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.83.1
- OS Version: windows 10
Steps to Reproduce:
- install https://marketplace.visualstudio.com/items?itemName=donjayamanne.typescript-notebook or https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-renderers
- open a workspace
- create typescript file 'a.ts' with some exports in the workspace, for example
export const a = 1
- create a notebook with one of the extensions and save it next to the typescript file.
- add a cell with language type 'typescript' or 'javascript'.
- import the exported symbol from step 3, for example:
import {a} from './a.ts'
- right click on file name and click
go to definition
Expected:
- The symbol imported normally.
go to definition lead you to the file next to it
Actually:
- The import has a red underline with
TS(2307) Cannot find module
go to definition lead you to a error page that has a nonsense path like this

Note:
It seems this is caused by the way typescript language extension handles virtual paths.
The typescript language extension put all virtual path under ^/{protocol}/{authority}/{file-path}#{cell-id}
Which end up being treated as {workspace root}/^/{protocol}/{authority}/{file-path}#{cell-id} by the language server
And thus broke all relative paths.
I made a experiment about appending the cell id and authority to file name instead, and it seems fix this issue.
mmis1000@bb9910b
Related issue: DonJayamanne/typescript-notebook#79
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
export const a = 1import {a} from './a.ts'go to definitionExpected:
go to definitionlead you to the file next to itActually:
TS(2307) Cannot find modulego to definitionlead you to a error page that has a nonsense path like thisNote:
It seems this is caused by the way typescript language extension handles virtual paths.
The typescript language extension put all virtual path under
^/{protocol}/{authority}/{file-path}#{cell-id}Which end up being treated as
{workspace root}/^/{protocol}/{authority}/{file-path}#{cell-id}by the language serverAnd thus broke all relative paths.
I made a experiment about appending the cell id and authority to file name instead, and it seems fix this issue.
mmis1000@bb9910b
Related issue: DonJayamanne/typescript-notebook#79