You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining a function called "require" the VSCode Deno extension reports unexpected errors (which I believe are related to the fact that the extension believes that this is a module import function from CommonJS).
To Reproduce
functionrequire(value: unknown): string{if(typeofvalue!=='string'){thrownewError('Argument is not a string');}returnvalue;}console.log(require('hello'));// will report an errorconststring='hello';console.log(require(string));// works fine
In the above code snippet the VSCode Deno extension will report the following error on the first require call:
Relative import path "hello" not prefixed with / or ./ or ../ and not in import map from "file:///Users/quentinadam/Projects/test/test.ts"deno(resolver-error)
Expected behavior
The extension should not report an error because this code compiles and checks correctly with deno (deno check).
Versions
vscode: 1.96.2
deno: 2.1.4
extension: 3.43.1
The text was updated successfully, but these errors were encountered:
Describe the bug
When defining a function called "require" the VSCode Deno extension reports unexpected errors (which I believe are related to the fact that the extension believes that this is a module import function from CommonJS).
To Reproduce
In the above code snippet the VSCode Deno extension will report the following error on the first require call:
Expected behavior
The extension should not report an error because this code compiles and checks correctly with deno (
deno check
).Versions
vscode: 1.96.2
deno: 2.1.4
extension: 3.43.1
The text was updated successfully, but these errors were encountered: