Language-tools: svelte-check doesn't see baseUrl/paths in tsconfig.js or what is happening

Created on 23 Feb 2021  路  1Comment  路  Source: sveltejs/language-tools

I've been trying to fix this for hours, looking through google and closed issues, but looks like I'm unable to can. :sob:
My mind is melting.

It was working with jsconfig.js, but not after I moved to ts.

Here's repro branch. https://github.com/non25/svelte-template-webpack/tree/svelte-check-ts-aliases

To reproduce on your machine:

  1. Download it with degit: npx degit non25/svelte-template-webpack#svelte-check-ts-aliases
  2. Install stuff like you always do
  3. Launch svelte-check: npm run validate or yarn validate
  4. See this helpful stuff:
    Error: Cannot find module '~/helper' or its corresponding type declarations. (ts) <script lang="ts"> import { helper } from '~/helper';
  5. Try hard to maintain sanity
  6. ... :face_with_head_bandage:
question

Most helpful comment

paths and baseUrl should be in the compilerOptions

>All comments

paths and baseUrl should be in the compilerOptions

Was this page helpful?
0 / 5 - 0 ratings