gpt4 book ai didi

npm - Composer 更新失败,错误为 "npm-signature"

转载 作者:行者123 更新时间:2023-12-04 22:15:08 28 4
gpt4 key购买 nike

同时更新我的​​ 应用程序库来自 composer update命令,退出

[InvalidArgumentException]                                                                                                          
Unknown downloader type: npm-signature. Available types: git, svn, fossil, hg, perforce, zip, rar, tar, gzip, xz, phar, file, path.

Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:128
Composer\Downloader\DownloadManager->getDownloader() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:152
Composer\Downloader\DownloadManager->getDownloaderForInstalledPackage() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:211
Composer\Downloader\DownloadManager->download() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:186
Composer\Installer\LibraryInstaller->installCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:90
Composer\Installer\LibraryInstaller->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:173
Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:160
Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:588
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:227
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:161
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:242
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:842
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:251
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:100
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:58
require() at /usr/local/bin/composer:24

直到昨天,一切都在我的本地开发环境中按预期工作。

今天,在推送一些更新时,staging 和 develop(与昨天的更新相比没有任何变化)都以上述错误退出。

这是我的 composer.json文件:
{
"name": "name/project",
"description": "Project",
"keywords": ["tags..."],
"homepage": "http://web.myaddress.yes/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.6",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0",
"dmstr/yii2-adminlte-asset": ">2",
"kartik-v/yii2-widgets": "^3.4",
"kartik-v/yii2-helpers": "^1.3",
"kartik-v/yii2-widget-activeform": "^1.4",
"kartik-v/yii2-datecontrol": "^1.9",
"kartik-v/yii2-editable": "^1.7",
"kartik-v/yii2-dropdown-x": "^1.2",
"kartik-v/yii2-dialog": "^1.0",
"kidzen/yii2-dynamicform": "^2",
"kartik-v/yii2-tabs-x": "^1.2",
"rmrevin/yii2-ionicon": "^1.2",
"kartik-v/yii2-date-range": "^1.6",
"kartik-v/php-date-formatter": "^1.3",
"kartik-v/yii2-export": "^1.2",
"webtoucher/yii2-js-cookie": "^1.0",
"lajax/yii2-translate-manager": "~1.7",
"mdmsoft/yii2-admin": "~2.0",
"elvenpath/yii2-eu-vatvalidator": "^1.1",
"kartik-v/yii2-widget-select2": "2.0",
"kartik-v/yii2-slider": "^1",
"edofre/yii2-fullcalendar-scheduler": "1.1.x-dev",
"kartik-v/yii2-mpdf": "dev-master"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1"
},
"config": {
"process-timeout": 1800
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}

这里有什么奇怪的地方,或者 NPM 服务器端有问题吗?

最佳答案

更新

此错误已在 last release 中修复的 fxp/composer-asset-plugin ,升级应该可以解决这个问题:

composer global require "fxp/composer-asset-plugin:^1.4.3"

Asset-packagist 也是 fixed .

这是 fxpio/composer-asset-plugin bug .似乎 npm 引入了 new feature into dist info ,这会破坏将 npm 包转换为 composer 包的插件。因此,每个使用此新功能的软件包都无法通过 Composer 安装。

我不知道任何简单的解决方法,您需要等到错误得到修复。但是如果您等不及,您可以尝试在您的 composer.json 中找到有问题的包并手动定义它。 .
"repositories": [
{
"type": "package",
"package": {
"name": "npm-asset/moment",
"version": "2.22.0",
"dist": {
"url": "https://registry.npmjs.org/moment/-/moment-2.22.0.tgz",
"type": "tar"
}
}
}
...
],

关于npm - Composer 更新失败,错误为 "npm-signature",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49940646/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com