[英]Composer 2.5.1 Symfony Ux-React Failed to Download Webpack Encore Pack
I have a Symfony project that uses composer and react.我有一个使用 composer 和 React 的 Symfony 项目。 I am trying to download the
symfony/ux-react
package with composer following this link: https://symfony.com/bundles/ux-react/current/index.html However, when I run composer require symfony/ux-react
I get the following error:我正在尝试通过以下链接使用 composer 下载
symfony/ux-react
package: https://symfony.com/bundles/ux-react/current/index.html但是,当我运行composer require symfony/ux-react
I收到以下错误:
- Downloading symfony/webpack-encore-pack (v1.0.2)
0/1 [>---------------------------] 0% Failed to download symfony/webpack-encore-pack from dist: The "https://api.github.com/repos/symfony/webpack-encore-pack/zipball/f9f4e91659e5f55de370d6aebe77e64bce35e4d3" file could not be downloaded (HTTP/2 404 ):
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#download-a-repository-archive"}
Now trying to download from source
- Syncing symfony/webpack-encore-pack (v1.0.2) into cache
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+lex-Blade-15-Mid-2019-Base+2023-01-27+1205 to retrieve a token.
This token will have read-only permission for public information only.
When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+lex-Blade-15-Mid-2019-Base+2023-01-27+1205
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/home/lex/.config/composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
Token (hidden):
I then create a token.然后我创建一个令牌。 Upon copy pasting it into the terminal:
将其复制粘贴到终端后:
Token stored successfully.
1/1 [============================] 100%
In Git.php line 471:
Failed to execute git clone --mirror -- 'https://ghp...PNs:x-oauth-basic@github.com/symfony/webpack-encore-pack.git' '/home/lex/.cache/composer/vcs/https---github.com-symfony-webpack-encore-p
ack.git/'
Cloning into bare repository '/home/lex/.cache/composer/vcs/https---github.com-symfony-webpack-encore-pack.git'...
remote: Repository not found.
fatal: repository 'https://github.com/symfony/webpack-encore-pack.git/' not found
Anyone know a fix for this?有人知道这个的修复方法吗? It appears that
webpack-encore-pack
is depreciated.看来
webpack-encore-pack
已经过时了。
Spoke too soon.说得太快了。 Found this link: https://github.com/symfony/symfony/discussions/42700
找到这个链接: https://github.com/symfony/symfony/discussions/42700
By uninstalling webpack encore with composer remove symfony/webpack-encore-pack
and then trying composer require symfony/ux-react
, no error occurred.通过使用
composer remove symfony/webpack-encore-pack
卸载 webpack encore 然后尝试composer require symfony/ux-react
,没有发生错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.