Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect resolve of path links to @ if vue project is located in subdirectory. #1892

Closed
3 tasks done
mlesin opened this issue May 2, 2020 · 3 comments
Closed
3 tasks done

Comments

@mlesin
Copy link

mlesin commented May 2, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Linux
  • Vetur version: 0.24.0
  • VS Code version: 1.44.2

Problem

When frontend project is located inside some subdirectory of folder opened by VS Code, Vetur fails to correctly resolve @ shortcuts in includes, says, for example:
Cannot find module '@/utilities/some'., while code keeps compiling succesfully.

Screenshot_20200502_175026

And, while it doesn't show such warning for *.vue files, it looks up them incorrectly, showing results from shims-vue.d.ts instead of actual file

Screenshot_20200502_175236

Reproducible Case

I created example repository here:
https://github.com/mlesin/vetur-bug

Steps to reproduce:

  1. Clone example repository
  2. Run npm ci from frontend subdirectory
  3. Open entire vertur-bug with File/Open Folder... in VS Code
  4. Open frontend/src/App.vue file
  5. Problem should arise in lines 10 and 11

Known workaround

If you open vertur-bug/frontend as a separate project in VS Code, everything works as expected.

@stanislav-suslov
Copy link

stanislav-suslov commented Jun 22, 2020

I have these trouble in JS on Windows 10 too, not just TypeScript and Linux.

@stanislav-suslov
Copy link

stanislav-suslov commented Aug 13, 2020

Looks like we already have #424 #815 which has #1928 pull request. I think this issue should be closed because of duplicate.

@mlesin
Copy link
Author

mlesin commented Aug 16, 2020

Agree

@mlesin mlesin closed this as completed Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants