S
S
Sergey Burduzha2017-11-01 19:21:07
Composer
Sergey Burduzha, 2017-11-01 19:21:07

How to solve an error when installing a package using composer?

I have ubuntu, installed composer globally, here is the content of composer.json

{
    "require": {
        "fxp/composer-asset-plugin": "^1.2.0"
    
}

Now I'm trying to install phpunit globally
composer global require phpunit/phpunit
and I'm getting this error
[Seld\JsonLint\ParsingException]               
  "./composer.json" does not contain valid JSON  
  Parse error on line 5:                         
  ...n": "^1.2.0"    }                           
  -------------------^                           
  Expected one of: '}', ','

What could be the problem, maybe in the plugin version, if so, how to update it.
I will be glad to help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tester_toster, 2017-11-01
@serii81

The closing bracket is missing, right in your attached code:

{
    "require": {
        "fxp/composer-asset-plugin": "^1.2.0"
    <b>}</b>
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question