melkam
melkam12mo ago

Typescript intelisense between jupyter notebooks

I've been trying to run jupyter notebooks with deno, but I've noticed that if I create a variable in one block and try to use it in another, I get a typescirpt error: Cannot find name 'x'. It doesn't really matter because if I run them, everything works as it should. But still, is this a vscode lsp problem? Or deno kernel? Or maybe I'm just setting something up wrong XD. I'm running it on wsl, so maybe it's a deal-breaker.
No description
No description
5 Replies
melkam
melkamOP12mo ago
I can declare variables in global scope myself and it works, but I think it should be done by default.
No description
Deno AI Helper
Deno AI Helper12mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like you're encountering an issue with TypeScript IntelliSense in the context of Jupyter notebooks when using Deno as the kernel. The error Cannot find name 'x' suggests that the TypeScript language server is not recognizing variables defined in previous cells when you're trying to use them in subsequent cells. This could be related to the scope of the variables within the Jupyter notebook environment when using Deno, or it might be an issue with the Visual Studio Code (VSCode) Language Server Protocol (LSP) integration with Jupyter notebooks. Here are a few things you might want to check or try: 1. Ensure that the Deno extension for VSCode is properly installed and configured. 2. Check if the issue persists across different notebooks or just a specific one. 3. Look for any settings or configurations within the Deno extension or Jupyter extension that might affect variable scope or TypeScript checking. Please note that this advice is not based on the Deno documentation, and I would recommend double-checking the accuracy of this advice and looking for more information on the topic. Since this seems to be an issue related to the interaction between Deno, TypeScript, and Jupyter notebooks within VSCode, you might also want to check the repositories or documentation for those projects for more insights or to file an issue if you believe this is a bug.
Antonio Sampaio
Antonio Sampaio12mo ago
im also facing this problem when using deno Jupiter notebooks
ThetaCake
ThetaCake9mo ago
Same problem for me. Did you ever find a solution?
cdoremus
cdoremus9mo ago
You might want to try this channel where the Deno Jupyter devs tend to hang out: https://discord.com/channels/684898665143206084/1066309002771845202