-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
build gets stuck at "after chunk asset optimization" #1813
Comments
I can also add that the before updating, I was using preact-cli 3.3.4 and had never experienced such issue. Then I went from 3.3.4 directly to 3.5.0 and the problem started. |
You can try enabling verbose Webpack stats, I don't believe CLI's
You can try to Keep in mind Preact-CLI is unmaintained -- I'd recommend bumping up to v4 and then move onto Vite via |
Hi @rschristian and thanks for the quick response! This allowed to determine where the build is exactly hanging: ...(tsconfig
? [
new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true,
async: !isProd,
tsconfig: tsconfig,
silent: !isWatch,
}), and the funny thing is that this dependency stayed exactly the same between cli 3.3.4 (where build never got stuck) and 3.5.0. So it must be some other thing which got updated and started to interfere with it, maybe ts itself, who knows. I would like to switch to Vite, but this is a production project, quite big, and at this time we haven't the resources for planning such a big switch. So at present, we can either further dig into the issue, or try Preact-CLI v4, but is it still being developed? Or is the entire project unmaintained? |
Odd, never seen that before.
That dep might not have changed, but #1798 would probably have an effect. Worth checking. Might be worth checking if it's outputting anything too: new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true,
async: !isProd,
tsconfig: tsconfig,
- silent: !isWatch,
+ silent: false,
}), Narrowing down the version range would also help, there's 8 versions between
It's a loose "unmaintained" -- I may pop in to fix some things that I need, and I'll (eventually) have time to review fixes if someone in the community wants to submit some, but I'm not going to be developing it any further. |
I wanted to follow up on this. After investigating quite a bit, I found out that the 4.x version of ForkTsCheckerWebPack plugin, which 3.5 version is depending on, seems to have some race/odd issues with the latest 4.9.x typescript versions. In fact all started after updating preact-cli to 3.5 and, as a consequence of #1798 , having ts updated to the latest version of the 4.9 branch. In the end I managed to find a good compromise to make everything work (upgrading ForkTsChecker to the 6.x branch and 2 tiny patches on preact-cli regarding the new fts configuration format, and disabling it for the babel-esm plugin which triggers another apply on all plugins). Now, I know that the 4.x version has newer dependencies but, since it also has some potentially breaking changes (or that's what I assumed after reading some information here here in the repo), in case somebody with big code bases want/need to stick with the 3.x branch for a while longer, I can submit a PR, if you think it might be useful Thanks again for the support! |
That is not what #1798 did, no. It did the opposite of that in fact, it removed TS altogether. Because we shipped a version of TS w/ CLI, the issue was that, with Node's module resolution, dependencies of CLI (like By removing the dependency, users are expected to provide their own version if they need it. This should be pretty clear in the release notes.
A better solution might be to downgrade your project's TS version to what was previously in use, rather than patching CLI.
If you'd like, though IIRC, newer versions caused other issues. If the test suite passes I'd be happy to merge though. |
yes, my bad, I haven't been clear, and indeed the description and the aim of your change is clear. What I meant was something like an indirect consequence of the change: passing from a "real" dependency to a peer dependency, made npm install "touch" the ts in my installation, removing CLI's own ts version and at the same time taking the chance to update my root ts installation, which ended up to v4.9.5, satisfying both your now peer dependency (
yes, I totally agree that patching a package is 100% bad practice, even more if patched by hand as I did (but I was just hacking out, I almost debugged all forkTsChecker 😄 in the process). That's one of the reasons I was also proposing the PR, the other being that I believe what happened to me could happen to others.
|
(Sorry, missed this)
I don't actually think that, I patch like a mad man sometimes to be honest! A-ok to do so in my book. There's just not a ton of new TS constructs since, so I was assuming it'd be easier to downgrade TS than maintain a patch, but I see nothing wrong with it either way -- just a guess as to what might be easier. |
Hi @rschristian! |
ook, here we go: https://github.com/krskrs/preact-cli/tree/3.x but now I'm not sure on how we should proceed. I created a new branch (3.x) b/c I couldn't patch master where you've the 4.x development ongoing. |
Sorry, meant to do that earlier. It's now up at |
What is the current behaviour?
Recently I have updated to the latest (stable) 3.5.0 version of Preact CLI and I started facing an issue where build would randomly (i mean not on every build) get stuck at this phase:
then, if I stop the build process and start it again, it would most likely finish without any issues.
So far I haven't been able to find any clues on when this happens, except for the fact that it seems more likely to happen when the ide has been opened for several hours, and less prone to happen on first builds. But let's not count on this, it could also be a suggestion.
Anyways, is there anything I could do just to get more detailed information which might help to pinpoint or debug more thoroughly the issue?
The text was updated successfully, but these errors were encountered: