We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From microsoft/vscode#34346
TypeScript Version: 2.5.2
Code In a new project
$ npm init -y $ npm install axios
import axios from 'axios';
{ "compilerOptions": { "strict": true, "module": "amd", "moduleResolution": "classic" } }
Expected behavior: axios includes its own typings so these should be used for the import
axios
Actual behavior: Module axios cannot be resolved.
"moduleResolution": "node" fixes the problem
"moduleResolution": "node"
The text was updated successfully, but these errors were encountered:
that is by design. do not use classic unless you have to. the reason it is there is purely back compat.
classic
Sorry, something went wrong.
Ok, is there a way to work around this without changing the resolution to node?
node
add a path mapping entry for module imports.
Thanks @mhegazy! I'll follow up with the user who opened this bug back on the vscode repo
No branches or pull requests
From microsoft/vscode#34346
TypeScript Version: 2.5.2
Code
In a new project
Expected behavior:
axios
includes its own typings so these should be used for the importActual behavior:
Module
axios
cannot be resolved."moduleResolution": "node"
fixes the problemThe text was updated successfully, but these errors were encountered: