Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Build fails with default tsconfig.json because of recent changes in ts-loader #156

Closed
pettyalex opened this issue Sep 6, 2017 · 6 comments

Comments

@pettyalex
Copy link

This change here: TypeStrong/ts-loader#621 results in the build failing because it is now using src/src as a root directory instead of src.

If anybody else gets blocked by this, the quick workaround is to change in tsconfig.json

"rootDir": "src",
to
"rootDir": ".",

To reproduce, just run create-react-app testing_app --scripts-version=react-scripts-ts and then run the build, and see:

error TS6059: File '/Users/alex.petty/src/testing_app/src/App.test.tsx' is not under 'rootDir' '/Users/alex.petty/src/testing_app/src/src'. 'rootDir' is expected to contain all source files.
@loilo
Copy link

loilo commented Sep 7, 2017

First and foremost: I'm sorry that my changes broke something.

I can reproduce the error with this package, however, if I try to boil it down I'm not getting the error anymore. I'll try to get to the error over the course of the day, but in case you'd want to help out, take a look at my repro repo and make a good guess why it's not reproducing the error yet. I've found the error and deleted the repro repo.

@loilo
Copy link

loilo commented Sep 7, 2017

Okay, I think I've got it boiled down. I've opened an issue over at the ts-loader repo to deal with this.

@loilo
Copy link

loilo commented Sep 7, 2017

For the record: I've found the issue. Unfortunately, the architectural decisions of my changes were flawed and my tests didn't cover them properly.

I've submitted a pull request to the ts-loader reverting my changes, a new version fixing the issue should come out later today.

@loilo
Copy link

loilo commented Sep 7, 2017

Changes have been reverted in 2.3.6 which was just released. Issue can be closed.

Thanks for your patience.

@pettyalex
Copy link
Author

Thanks for the prompt fix!

@johnnyreilly
Copy link

No problem!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants