typescript-notebook icon indicating copy to clipboard operation
typescript-notebook copied to clipboard

Typescript doesn't seem to work.

Open 0xorial opened this issue 1 year ago • 4 comments

image

0xorial avatar Feb 18 '23 17:02 0xorial

I have the same issue. It used to work perfectly, and I did not change anything and it suddenly stopped working out of no where on all my computers and all my projects no matter the setup.

I can run the code just fine and it works, but in the editor node_modules imports do not work.

image

The issue does not appear to be the same as these, since npm imports are broken and I am not attempting to do anything cross-cell.

https://github.com/DonJayamanne/typescript-notebook/issues/57 https://github.com/DonJayamanne/typescript-notebook/issues/74#issuecomment-1229406059

paustint avatar Jun 22 '23 23:06 paustint

@paustint I had this issue with VSCode on both this repo's extension and tslab. I downgraded my VSCode to 1.78 and this seems to have resolved the issue

EDIT: Added a PR for VS Code to fix this https://github.com/microsoft/vscode/pull/186812

nthh avatar Jul 01 '23 02:07 nthh

I am having this issue

jermatic avatar Aug 03 '23 15:08 jermatic

It seems to be vscode's own bug.

The vscode use a virtual path to represent cells in a notebook file (you can see the virtual path in the log by enable "typescript.tsserver.log": "verbose" and open the log file mentioned in typescript extension output). https://github.com/microsoft/vscode/blob/f6bc90dc1f367dcd596209ae62add169b11845cf/extensions/typescript-language-features/src/typescriptServiceClient.ts#L714C76-L718

Which, unfortunately broke relative path.

Because the typescript language server would assume your file under other (relative path) places

圖片

And thus no relative path would work.

I wonder if change the vscode to append inMemoryResourcePrefix, scheme and authority in the file name instead will fix the path. But I have no experience to edit vscode itself. So I don't know how to test it yet.

mmis1000 avatar Oct 17 '23 13:10 mmis1000