-
Notifications
You must be signed in to change notification settings - Fork 692
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
[Bug] Couldn't find package "tslib" error in a nested project structure #4175
Comments
Thanks for reporting @mhatvan! You mentioned I ask because when I just took another look at the implementation for this hint it looks like it currently only checks the top-level
If so, a fix here likely requires updating the hint to scope the check to opened/included |
It is part of the project being loaded as a sub module, so the checking for |
@mhatvan would you be interested in putting together a PR for this fix? Looks like the hint is already triggered after parsing a |
Sure thing, will provide a PR soonish ;) |
@antross After taking an initial look, I am wondering how I can receive the current full path where the Then this would work: |
@mhatvan thanks for taking a look! I think we already have the path to the
Does that help? |
Yep, that's it! I got confused because it is not an absolute path but is prefixed by |
Change pathToTslib to resolve the path to tslib based on the tsconfig.json location rather than current working directory - - - - - - - - - - - - - - - - - - - - Fix webhintio#4175 Close webhintio#4258
🐛 Bug report
Description
I am working on a frontend that had the expected structure with tsconfig.json at the root of the project, no error was reported.
Now the frontend was integrated as git submodule within a project with a nested folder structure and I always get the error:
This error pops up even though
tslib
is installed (v2.0.3) andimportHelpers: true
is enabled in thetsconfig.json
Environment
hint
version: 1.5.9 (VSCode)Node.js
version: v14.12.0OS
: UbuntuThe text was updated successfully, but these errors were encountered: