【问题标题】:Composer 2.5.1 Symfony Ux-React Failed to Download Webpack Encore PackComposer 2.5.1 Symfony Ux-React 下载Webpack Encore Pack 失败
【发布时间】:2023-01-28 01:18:08
【问题描述】:

我有一个使用作曲家和反应的 Symfony 项目。我正在尝试通过此链接下载带有作曲家的symfony/ux-react包:https://symfony.com/bundles/ux-react/current/index.html 但是,当我运行 composer require symfony/ux-react 时,出现以下错误:

  - 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): 

然后我创建一个令牌。将其复制粘贴到终端后:

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   

有人知道这个的修复方法吗? webpack-encore-pack 似乎已贬值。

【问题讨论】:

    标签: reactjs symfony composer-php


    【解决方案1】:

    说得太快了。找到这个链接:https://github.com/symfony/symfony/discussions/42700

    通过composer remove symfony/webpack-encore-pack卸载webpack encore,然后尝试composer require symfony/ux-react,没有出现错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-31
      • 2018-08-13
      • 2021-03-23
      • 2020-01-29
      • 1970-01-01
      • 2016-06-27
      • 1970-01-01
      相关资源
      最近更新 更多