remix icon indicating copy to clipboard operation
remix copied to clipboard

`remix build` hangs after build when no tty is available.

Open tiagoad opened this issue 2 years ago • 2 comments

What version of Remix are you using?

1.9.0

Steps to Reproduce

Add a package.json script build that runs remix build, and another that runs npm-run-all -l build.

Expected Behavior

Build finishes as usual.

Actual Behavior

Build hangs after Built in 2.3s.

tiagoad avatar Jan 06 '23 16:01 tiagoad

As a workaround, I changed the build script to script -qefc \"script -q /dev/null remix build\"

tiagoad avatar Jan 06 '23 16:01 tiagoad

remix build > /dev/null 2>&1 also works

cdeath avatar Jan 07 '23 17:01 cdeath

Reproducible with turborepo and pnpm run -r

TrySound avatar Feb 22 '23 10:02 TrySound

Remix build started to hang since https://github.com/remix-run/remix/releases/tag/remix%401.7.5. Probably in https://github.com/remix-run/remix/pull/4410

cc @pcattori

TrySound avatar Feb 22 '23 10:02 TrySound

Reproduced with pnpm run --parallel --filter=@webstudio-is/builder build

Found this incremental flag make build hang. With incremental: false all works. https://github.com/remix-run/remix/blob/542c09afbd226b31739e2f5cf080c28b7fc66979/packages/remix-dev/compiler/compileBrowser.ts#L220

TrySound avatar Feb 23 '23 13:02 TrySound

@pcattori New esbuild version seems moved away from incremental flag so upgrade may solve the issue.

TrySound avatar Mar 14 '23 16:03 TrySound

Remix v1.16 shipped with more changes to compiler including upgrading to esbuild 0.17.6 and removing the incremental flag in favor of rebuilds via esbuild context. Can anyone here try things out with latest and see if this is still an issue?

pcattori avatar May 02 '23 03:05 pcattori

Tested on 1.18.1. Original issue seems to be resolved.

package.json scripts:

{
  "scripts": {
    "stuff": "npm-run-all -l build",
    "build": "remix build",
  }
}

Running npm run stuff finishes without hanging:

Screenshot 2023-07-03 at 1 36 00 PM

pcattori avatar Jul 03 '23 17:07 pcattori

@TrySound like I mentioned earlier, we've upgraded to esbuild 17 and are now using esbuild context (instead of incremental option) for incremental builds.

If issue reemerges, feel free to reopen.

pcattori avatar Jul 03 '23 17:07 pcattori