sergees
sergees8mo ago

Deno LSP vscode issues when using Remote Explorer

Once in every few minutes I have to restart LSP because it stops resolving unimported names which is pretty annoying. Deno 1.40.4. Amazon Linux 2023. In the logs I see a lot of messages like this (on every key stroke) Could not set npm package requirements. Error getting response at https://registry.npmjs.org/pg-native for package "pg-native": An npm specifier not found in cache: "pg-native", --cached-only is specified. Is this unstable LSP behaviour on a remote machine expected? Feels like it was okay several days ago.
1 Reply
Deno AI Helper
Deno AI Helper8mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the message you've provided, it seems like there might be an issue with the Deno Language Server (LSP) trying to resolve npm package requirements, which is unusual because Deno does not use npm packages directly. The error message you're seeing suggests that the LSP is attempting to fetch information from the npm registry, which should not be the case for Deno as it does not rely on npm. This could be a misconfiguration or an extension conflict within your VSCode setup, especially since you mentioned that this behavior started only a few days ago. Here are a few things you might want to check: 1. Ensure that you do not have any Node.js or npm-related extensions that might be interfering with the Deno LSP. 2. Check your Deno settings in VSCode to make sure they are correctly configured for Deno development and not inadvertently set to interact with npm. 3. Verify that your project does not contain any accidental import statements that reference npm packages, which might be causing the LSP to look for npm packages. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. If the issue persists, you might want to consider reaching out to the Deno community or filing an issue on the Deno GitHub repository for more specific assistance.