Composer因“npm-signature”错误而无法更新

前端之家收集整理的这篇文章主要介绍了Composer因“npm-signature”错误而无法更新前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
通过composer update命令更新我的 yii2应用程序库时,composer-php退出
[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

直到昨天,一切都在我当地的开发环境中按预期运行.

今天,在推送一些更新时,暂存和开发(与昨天的更新相比没有变化)退出上述错误.

这是我的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服务器端有问题吗?

另一种解决方法是使用bower-asset /而不是npm-asset.

我能够将我的所有npm资产包转换为bower-asset,并且完美运行.

注意:确保版本号匹配.

猜你在找的PHP相关文章