How to fix "Failed to download symfony/webpack-encore-pack from dist"

How to fix "Failed to download symfony/webpack-encore-pack from dist" banner

To fix failed to download symfony webpack encore pack from dist you have to replace symfony/webpack-encore-pack with symfony/webpack-encore-bundle in your composer.json file.

First, remove the old package which is not supported anymore

composer remove symfony/webpack-encore-pack

Then install the new package

composer require symfony/webpack-encore-bundle

You may need to tweak your webpack.config.js since the new version introduces some minor changes to the syntax.

You can read more about Webpack in the official documentation.

Why do I get an error?

Installing symfony/webpack-encore-pack (v1.0.3): Downloading  
  Failed to download symfony/webpack-encore-pack from dist: 
The "https://api.github.com/repos/symfony/webpack-encore-pack/zipball/8d7f51379d7ae17aea7cf501d910a11896895ac4"
 file could not be downloaded (HTTP/1.1 404 Not Found)

When WebPack was introduced in the Symfony ecosystem the standard package was symfony/webpack-encore-pack, but that later changed in favor of symfony/webpack-encore-bundle. Deleting the old repository seems a bit exotic, most probably the authors made a mistake and deleted the repository instead of achieving it.

Judging from this GitHub issue it seems that the deletion was not intended and it was a mistake.

GitHub issue conversation about deleting the old package instead of archiving it.