Closed
Description
TypeScript Version: 3.1.3
Code
//@ts-check
const { axios } = require('axios')
Expected behavior:
Axios will be required from './node_modules/axios/index'
Actual behavior:
Error shown is cannot find module 'axios'
despite axios being installed. Note that this problem is not axios specific, it occurs with any module. However, if I use the following syntax then it is required correctly.
//@ts-check
const { axios } = require('./node_modules/axios/index')
Screenshots:
The error:
No error when using path:
TypeScript debug error: