-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Error if module not found #9132
Comments
You need to provide to provide more information than this... What is your project configuration? How do you know that TS doesn't find it, what problems is this causing? What version of TypeScript are you using? What is an example of a file that does not exist? Are we just supposed to guess? Just randomly guessing, based on other questions you have asked, you are trying to import JavaScript files using the Resolving that at design time and throwing an error, would cause a lot of problems for people attempting to import 3rd party libraries which are not resolvable at design time. |
There are no semantic errors reported in JS files. only in .ts files. If i am guessing correctly you are expecting this error in .js file. The rational here is users could have existing JS files with dynamic behavior, e.g. I understand that leaves more to be desired, we have #6802 tracking making these JS errors more configurable, so you can decide whether or not you want to see these errors. |
leaving this as needing more info. as @kitsonk noted, more context would be needed to assess or investigate this issue. |
Here is more info. I have enabled
TS does not give me any errors. |
@OliverJAsh as stated above:
|
I think this is the same as #6802. The compiler has this information, it just decides not to report these errors in JS files. we will need some error configuration infrastructure to make them surface. |
closing in favor of #6802 |
#6802 is broad, but likely the right place. I will mention it there too that if that were the case, like this one, not all of these errors are fatal and even in an IDE. I suspect the |
If I try to import a module and TS doesn't find it, I don't get any errors.
allowJs
is enabled.The text was updated successfully, but these errors were encountered: