Open Bug 1755334 Opened 3 years ago Updated 3 years ago

Treeherder frontend fails to launch in local development environment: frontend exited with code 0: The command moved into a separate package: @webpack-cli/serve

Categories

(Tree Management :: Treeherder, defect)

defect

Tracking

(Not tracked)

People

(Reporter: aryx, Unassigned)

References

()

Details

This is a regression from the upgrade of the webpack-dev-server to v4 in https://github.com/mozilla/treeherder/commit/389c4ee0273792de2477f604e2118e4e7b834a31

docker-compose up fails with:

frontend           | $ node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode development --env.BACKEND=http://backend:8000 --host 0.0.0.0
frontend           | The command moved into a separate package: @webpack-cli/serve
frontend           | Would you like to install serve? (That will run yarn add -D @webpack-cli/serve) (yes/NO) : Done in 0.56s.
frontend exited with code 0

In addition to local fixes in the treeherder repository, this also requires breaking changes in the neutrino repository because webpack-dev-server moved several config attributes from top level to attributes as parents.

backing this out seems to fail in CI on javascript tests. If we install @webpack-cli/serve does it work? I suspect maybe not fully.

why does this only affect local development and not production? Maybe we need to fix that as I thought docker would keep environments the same.

https://github.com/Archaeopteryx/treeherder/tree/frontendLaunchFix is the Treeherder part which fixed the issue locally over here.

(In reply to Joel Maher ( :jmaher ) (UTC -0800) from comment #2)

why does this only affect local development and not production? Maybe we need to fix that as I thought docker would keep environments the same.

webpack-dev-server is listed in the devDependencies section of package.json, and testing likely doesn't require its features (like hot reloading).

You need to log in before you can comment on or make changes to this bug.