Reputation: 111
When I run this command
composer config repositories.companyname composer https://composer.companyname.com/community/
I get this error
[Seld\JsonLint\ParsingException]
"" does not contain valid JSON
Parse error on line 1:
composer https://
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
My JSON file contents
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"config": {
"preferred-install": "dist",
"sort-packages": true
},
"version": "2.4.1",
"require": {
"magento/product-community-edition": "2.4.1",
"magento/composer-root-update-plugin": "~1.0"
},
"autoload": {
"exclude-from-classmap": [
"**/dev/**",
"**/update/**",
"**/Test/**"
],
"files": [
"app/etc/NonComposerComponentRegistration.php"
],
"psr-0": {
"": [
"app/code/",
"generated/code/"
]
},
"psr-4": {
"Magento\\": "app/code/Magento/",
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
}
},
"require-dev": {
"allure-framework/allure-phpunit": "~1.2.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"friendsofphp/php-cs-fixer": "~2.16.0",
"lusitanian/oauth": "~0.8.10",
"magento/magento-coding-standard": "*",
"magento/magento2-functional-testing-framework": "^3.0",
"pdepend/pdepend": "~2.7.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.8.0",
"phpstan/phpstan": ">=0.12.3 <=0.12.23",
"phpunit/phpunit": "^9",
"sebastian/phpcpd": "~5.0.0",
"squizlabs/php_codesniffer": "~3.5.4"
},
"conflict": {
"gene/bluefoot": "*"
},
"autoload-dev": {
"psr-4": {
"Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/",
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/"
}
},
"minimum-stability": "stable",
"prefer-stable": true,
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
"extra": {
"magento-force": "override"
}
}
I tried to run composer with root user and owner user. I'm trying to install a module via composer
I test my composer.json file on https://jsonlint.com/ but the result is 'Valid JSON'.
I tried to google with the error but I can't find any solution
Could anyone help?
Upvotes: 0
Views: 872
Reputation: 19
I got this error too, for me the solution was to delete other extension (typo3 cms) because the composer.json
was empty there!
Upvotes: 0