question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alias is not resolved

See original GitHub issue

Describe the bug I used import alias @/ and it worked. Then i switched to Vite and it supports only root aliases. So i switched my code to use /@/ aliases. It compiles and works in browser, but gives me an error in vscode:

image

To Reproduce Use /@/ import

Expected behavior Everything works

System (please complete the following information):

  • OS: Ubuntu
  • IDE: VSCode
  • Plugin/Package:“Svelte for VSCode”

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
dummdidummcommented, Aug 21, 2020

The problem is inside our module-loader, which delegates to the normal TS resolution because the check for “is absolute path” is true (file paths starting with / are absolute in linux). I think we need additional checks for “is this prefix part of tsconfig paths”.

2reactions
numfincommented, Aug 27, 2020

I forgot to say how awesome you guys are. Thank you for quick response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't the Route 53 Alias record for my Elastic Load ... - AWS
If your Elastic Load Balancing Alias record type is misconfigured, then the DNS record won't resolve as expected.
Read more >
Webpack doesn't resolve properly my alias - Stack Overflow
Check this webpack resolve alias gist with a simple example. Another solution to limit the number of relative paths is to add your...
Read more >
bash: alias: alias: not found - Ask Ubuntu
I had the same issue, so the solution is to follow simply rules. alias alias_name='command '. no other symbols between equal sign.
Read more >
Outlook alias not resolving properly (i.e., - Microsoft Community
Outlook alias not resolving properly (i.e., outlook_3C65CC6B54969D02 @ outlook.com) · 1. Using a different @Outlook alias (result: same ...
Read more >
How to fix "resolve.alias" problem in Vite.js - Raul Melo
Also, Vite.js is getting more and more traction among the community due to its power, simplicity, and stable API, but that's not the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found