Skip to content

Instantly share code, notes, and snippets.

@beck
Last active May 11, 2020 17:02
Show Gist options
  • Save beck/849700fc765bcfe6b80a8f85cc29b0f7 to your computer and use it in GitHub Desktop.
Save beck/849700fc765bcfe6b80a8f85cc29b0f7 to your computer and use it in GitHub Desktop.
VS Code import woe - Cannot find module (2307)
export const msg = "hello";
// Error:
// Cannot find module 'hello' or its corresponding type declarations.ts(2307)
import { msg } from 'hello';
console.log(msg);
// 👍
import { msg } from 'hello';
console.log(msg);
{
"compilerOptions": {
"baseUrl": "."
},
"exclude": [
"**/*.spec.ts"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment