解决./composer.json“ does not match the expected JSON schema

韦望
2023-12-01

问题

composer install 报错

[Composer\Json\JsonValidationException]                                                                     
  "./composer.json" does not match the expected JSON schema:                                                  
   - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$ 

原因

“name”: “gsj” 不符合:

^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$ 

即 name要加上 /

修改成name": “gsj/gsj”,即可

 类似资料: