Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript doesn't seem to work. #79

Open
0xorial opened this issue Feb 18, 2023 · 4 comments
Open

Typescript doesn't seem to work. #79

0xorial opened this issue Feb 18, 2023 · 4 comments

Comments

@0xorial
Copy link

0xorial commented Feb 18, 2023

image

@paustint
Copy link

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.

#57
#74 (comment)

@nthh
Copy link

nthh commented Jul 1, 2023

@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 microsoft/vscode#186812

@jermatic
Copy link

jermatic commented Aug 3, 2023

I am having this issue

@mmis1000
Copy link

mmis1000 commented Oct 17, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants