Error when using composer require-dev.mikey179/vfsStream is invalid
Asked Answered
C

4

11

I am using Amazon LightSail and the CodeIgniter framework. Trying to install PhpSpreadsheet - https://phpspreadsheet.readthedocs.io/en/latest/#installation using

composer require phpoffice/phpspreadsheet

However I then am greeted with

 [RuntimeException]
  require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use mikey179/vfsstream instead.

I did the usual Googling but couldn't find anything specific.

When I run

composer.phar show

I get the error from above.

Canvasback answered 7/5, 2021 at 14:40 Comment(4)
which php version are you installing onto?Lactation
also check this: github.com/bovigo/vfsStream/issues/173Lactation
Please share more details about the current state of your composer.json. Also, which version of Composer are you using?Boucicault
How do I find out the version? Every command I try and run, it fails with that error. I'm on Amazon LightSail...Canvasback
A
24

You must have mikey179/vfsStream in your composer.json in require-dev section (as the problem is for require-dev and you are trying to do normal require).

Simply change the name of package to all lowercase characters.

Aircraft answered 7/5, 2021 at 15:35 Comment(0)
R
12

Just replace mikey179/vfsStream with mikey179/vfsstream

they need to be in lowercase

Reheat answered 30/9, 2021 at 18:7 Comment(1)
This has already been pointed out in several other answers.Workbag
B
6

Make this "mikey179/vfsStream" package name to lowercase.

"mikey179/vfsStream" replace this to "mikey179/vfsstream"

Bloodroot answered 11/5, 2021 at 6:48 Comment(0)
R
3

In your composer.json file look for mikey179/vfsStream and lowercase all its characters and make it mikey179/vfsstream

"require-dev": {
    "mikey179/vfsstream": "1.1.*",
    "phpunit/phpunit": "4.* || 5.*"
}
Rubenrubens answered 1/9, 2021 at 11:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.