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
I'm developing a new feature to vscode itself. I want to use a npm module(axios) in the source.
In the root of project,
npm install --save axios
Any in any typescript file of vscode,
import * as axios from 'axios';
There's error: [ts] Cannot find module 'axios'.
But when I import other npm which is already in original vscode package.json such as winreg. Then, the statementimport * as winreg from 'winreg'; doesn't show any error.
Question: How do I import a new npm module into vscode?
The text was updated successfully, but these errors were encountered:
This seems like a bug when using "moduleResolution": "classic" as we do in VSCode. I've opened microsoft/TypeScript#18492 to track this. I'm tried putting together a workaround but was not able to come up with one. Someone on the TS team may have a better idea on what to do here
I'm developing a new feature to vscode itself. I want to use a npm module(axios) in the source.
In the root of project,
Any in any typescript file of vscode,
There's error:
[ts] Cannot find module 'axios'.
But when I import other npm which is already in original vscode package.json such as
winreg
. Then, the statementimport * as winreg from 'winreg';
doesn't show any error.Question: How do I import a new npm module into vscode?
The text was updated successfully, but these errors were encountered: