使用composer时出错 require-dev.mikey179/vfsStream 无效

pee*_*pee 11 codeigniter composer-php codeigniter-3 amazon-lightsail

我正在使用 Amazon LightSail 和 CodeIgniter 框架。尝试安装 PhpSpreadsheet - https://phpspreadsheet.readthedocs.io/en/latest/#installation使用

composer require phpoffice/phpspreadsheet
Run Code Online (Sandbox Code Playgroud)

然而我随后受到欢迎

 [RuntimeException]
  require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use mikey179/vfsstream instead.
Run Code Online (Sandbox Code Playgroud)

我做了通常的谷歌搜索,但找不到任何具体的东西。

当我跑步时

composer.phar show
Run Code Online (Sandbox Code Playgroud)

我从上面得到了错误。

kub*_*uba 24

您必须mikey179/vfsStream在您的composer.jsoninrequire-dev部分中(因为问题是针对的require-dev并且您正在尝试执行正常要求)。

只需将包名称更改为全部小写字符即可。


Aid*_*lam 11

只需将mikey179/vfsStream替换为mikey179/vfsstream

它们必须是小写的

  • 这一点在其他几个答案中已经指出了。 (2认同)

小智 5

将此“mikey179/vfsStream”包名称设置为小写。

“mikey179/vfsStream”将其替换为“mikey179/vfsstream”