-
Notifications
You must be signed in to change notification settings - Fork 74
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
Referring to the same file with different casing causes empty output #122
Comments
What a bummer. I see why that happens... Not sure what the appropriate fix is, necessarily. The problem is that since Windows is case-insensitive and Obviously, "don't do that" (relying on case-insensitivity means you've made your project impossible to build on other platforms for no good reason) -- but error messages are kind of necessary to even diagnose the issue. |
For reference, I actually first encountered this bug on OS X, which is also case-insensitive! TypeScript seems to have gained a new option involving referencing files with different casing throwing errors. Does this problem happen at the TypeScript level or elsewhere? If it's elsewhere, it might be possible to half-way fix the problem by detecting a case-sensitive filesystem and normalizing all paths down. I didn't see any ways to detect something like that out-of-the-box in Node.js, but there are some obvious ideas with some potential for false-positives. |
TIL that OSX is case-insensitive too! (As I'm typing this on OSX, no less...) My assumption is that the error happens at the level of the in-memory file store, which is keyed on (case-sensitive) filename. There might be a way of using the TS compiler's mechanism for detecting the problem, though... would be worth looking into. |
This should be closed by #171. However, the changes in that PR weren't made to resolve this issue; its resolution is a side-effect. With said changes, the output bundle should contain what you'd expect. (However, that might not be the end of your problems, as I noticed that there were errors with paths in the source maps if there were mismatches in case. Probably best to ensure the case is correct, but I don't think it's up to |
I have an app that's roughly structured like this:
main.ts
referencedGame/Core.ts
with the nameapp/Game/Core
(correct), whileNet/index.ts
referenced it withapp/game/Core
(incorrect).The result is that the output bundle is empty, with no errors or warnings reported. Fixing the casing to be correct in all cases fixes the issue, but an error would be nice.
This is on Windows 10, with tsify 0.14.1, Browserify 13.0.0, and TypeScript 1.8.9.
The text was updated successfully, but these errors were encountered: