Reputation: 3821
I'm working on a Remix JS project, and in order to debug I have to export a function called 'debug'.
However, for some reason VSCode's intellisense can't find it. It offers this:
if I enter another function exported from the same module it finds it without problems:
Here is the module I'm importing from:
export function debug() {
return;
}
export function hello() {
return "hi";
}
I have no idea why this is happening... Any help would be appreciated!
Upvotes: 0
Views: 85
Reputation: 3821
OK, found the issue.
You need to install @types/debug
and @types/react
. VS Code doesn't like .js or .jsx projects without those packages.
And my .jsconfig needed to look like this:
{
"compilerOptions": {
"baseUrl": ".",
"checkJs": true,
"jsx": "react"
},
"exclude": [
"public",
"netlify"
]
}
Upvotes: 1