-
Notifications
You must be signed in to change notification settings - Fork 71
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
Monorepo: watch mode results in Error: Could not find source file
#214
Comments
Might be related to #188 Another workaround is to disable typechecking with |
I have the issue combining I'll try debug a little bit more, but indeed |
I have a similar issue currently, using lerna and a I fix this by simply change the order of the plugins from: [
typescript(),
resolve(),
commonjs(),
] to [
resolve(),
commonjs(),
typescript(),
] Maybe you can have a shot. |
This solved my same problem. 绝了。 |
Reordering didn't help me much. Had to go with the For more context, I'm using turborepo monorepo, and while the initial running of the dev server finds my typescript files in the monorepo |
rollup -w
results in Error: Could not find source file
It's occasionally occur the error in my case, when i modify |
rollup -w
results in Error: Could not find source file
Error: Could not find source file
This seems to have been fixed by #332 which was released in I tested the reproduction with As such, closing this as fixed. Please upgrade to |
What happens and why it is wrong
A normal one-time build works fine. However, when using
rollup -w
, rpt2 seems to have trouble finding source files if I edit one of the deeper module dependencies in one of the other packages.This is with a Lerna monorepo setting up symlinks to the in-repo dependencies.
Test repo: https://github.com/jrburke/jr-monorepo-rpt2
I do not want to use
preserveSymlinks
because in my real project, it results in duplicates of modules in the final built project, since multiple packages in the repo share common dependencies. I have tried a version usingpreserveSymlinks
, and so as a last resort I could configure a dev setup that usespreserveSymlinks
, but standalone/first time builds work without it, and I would like to keep the watch setup the same as the normal builds.Environment
Details to reproduce in the above example repo.
Versions
rollup.config.js
tsconfig.json
Top level tsconfig.json:
packages/jr-player/tsconfig.json
:package.json
I don't think it is relevant, but it is in the test repo.
plugin output with verbosity 3
Attached, but also in test repo at
verbose-error.txt
:verbose-error.txt
The text was updated successfully, but these errors were encountered: