Typescript cannot find module that was defined in “paths” setting

The solution is to edit the paths config to find nested files.

"baseUrl": ".",
"paths": {
  "app*": ["src/app*"]
}

Now when I add import { Test } from 'app/components' Typescript will look into src/app/components/index.js and it works. I also like to add @ to aliases to avoid conflicts with other modules. Like so:

  "@app*": ["src/app*"]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)