title: TS config path error. Error: Cannot find module '@/models/UserSchema'
body: <p>I am making a discord bot and I was trying the path aliases feature on typescript. but I somehow keep getting this error when I am using it. I am using NodeJs and using</p>
  <p>Here is the error message</p>
  <pre><code>Error: Cannot find module '@/models/UserSchema'
  Require stack:
  - /mnt/c/Users/ASUS/Documents/_Frastio-Docs/dev/DinderBot/src/index.ts
      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
      at Function.Module._resolveFilename (/mnt/c/Users/ASUS/Documents/_Frastio-Docs/dev/DinderBot/node_modules/module-alias/index.js:49:29)
      at Function.Module._load (node:internal/modules/cjs/loader:778:27)
      at Module.require (node:internal/modules/cjs/loader:1005:19)
      at require (node:internal/modules/cjs/helpers:102:18)
      at Object.&lt;anonymous&gt; (/mnt/c/Users/ASUS/Documents/_Frastio-Docs/dev/DinderBot/src/index.ts:13:1)
      at Module._compile (node:internal/modules/cjs/loader:1101:14)
      at Module.m._compile (/mnt/c/Users/ASUS/Documents/_Frastio-Docs/dev/DinderBot/node_modules/ts-node/src/index.ts:1056:23)
  </code></pre>
  <p>and here is the code when I am trying to use the path. It appears to be correct with no error on vscode but when I run the app its giving the cannot find module error</p>
  <pre><code>import Test from '@/models/TestSchema'
  import User from '@/models/UserSchema'
  </code></pre>
  <p><a href="https://i.stack.imgur.com/WEd5a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WEd5a.png" alt="enter image description here" /></a></p>
  <p>My tsconfig.json</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;strictNullChecks&quot;: true,
      &quot;baseUrl&quot;: &quot;.&quot;,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;lib&quot;: [&quot;es5&quot;, &quot;es6&quot;],
      &quot;module&quot;: &quot;CommonJS&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;outDir&quot;: &quot;./dist&quot;,
      &quot;paths&quot;: {
        &quot;@/*&quot;: [&quot;src/*&quot;]
      },
      &quot;resolveJsonModule&quot;: true,
      &quot;sourceMap&quot;: true,
      &quot;target&quot;: &quot;es6&quot;,
      &quot;types&quot;: [&quot;node&quot;]
    },
    &quot;include&quot;: [&quot;**/*.ts&quot;],
    &quot;exclude&quot;: [&quot;node_modules&quot;]
  }
  </code></pre>
  <p>my folder structure, the tsconfig is on the outside of the src folder
  <a href="https://i.stack.imgur.com/RTLNG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RTLNG.png" alt="folder structure" /></a></p>