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

local file with private class properties symlinked multiple times erroneously fails compilation #324

Closed
seansfkelley opened this issue Oct 17, 2016 · 10 comments
Labels

Comments

@seansfkelley
Copy link

The title is a mouthful, but basically, I'm seeing microsoft/TypeScript#6496 on Typescript 2.0.3, but only when run through Webpack. I'm not 100% which of the many moving parts is at fault here, so I've cross-posted an issue here and as a comment on microsoft/TypeScript#6496.

The repro is sort of involved, so I made a repo to demonstrate: https:/seansfkelley/typescript-lerna-webpack-sadness

@blakeembrey
Copy link
Member

blakeembrey commented Oct 18, 2016

@seansfkelley Doesn't seem like a bug in ts-loader, as you already found 😄 It's an issue with TypeScript, see also microsoft/TypeScript#11436 and microsoft/TypeScript#7755. It's a bit of a PITA.

@seansfkelley
Copy link
Author

What's strange about the repro I provided above is that it only seems to happen when running through Webpack. tsc behaves just fine (in line with microsoft/TypeScript#6496 (comment)), but something about Webpack specifically seems to be causing issues. I wasn't able to nail down anything more precise than that repro though.

@blakeembrey
Copy link
Member

Perhaps one is getting the realpath internally. No sure, hopefully there's some insights here for others 😄

@ghost
Copy link

ghost commented Feb 10, 2017

This is working with tsc and with https:/s-panferov/awesome-typescript-loader.
It looks like ts-loader's ModuleResolutionHost only implements 2 methods.
Try implementing the optional methods in ModuleResolutionHost, particularly realpath.

@johnnyreilly
Copy link
Member

Thanks for commenting @andy-ms. If you could submit a PR that would be greatly appreciated. John

@johnnyreilly
Copy link
Member

Looking at the atl implementation it may be as simple as replacing moduleResolutionHost with compiler.sys

@johnnyreilly
Copy link
Member

In the compiler.resolveModuleName call

@veeramarni
Copy link

Would there be a permanent fix or need to use the workaround? I think it was working with awesome-typescript-loader

@stale
Copy link

stale bot commented Jan 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 19, 2019
@stale
Copy link

stale bot commented Jan 26, 2019

Closing as stale. Please reopen if you'd like to work on this further.

@stale stale bot closed this as completed Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants