Updating composer throws exception Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
<p>I recently ran latest composer installation for a Yii2 basic application template.</p>

<p>But running <code>php composer.phar install</code> throws this exception:</p>

<blockquote>
  <p>Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not
  exist</p>
  
  <p>The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0,
  this <em>WIL L</em> break in the future and it should be fixed ASAP (require
  ^1.0 for example).</p>
  
  <p>[ReflectionException]   Class
  Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist</p>
  
  <p>[ErrorException]</p>
  
  <p>Declaration of
  Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::w
  hatProvides() should be compatible with
  Composer\Repository\ComposerRepository::
  whatProvides(Composer\DependencyResolver\Pool $pool, $name,
  $bypassFilters = fal se)</p>
</blockquote>

<p>Here is my composer.json: </p>

<pre><code>{
    "name": "yiisoft/yii2-app-basic",
    "description": "Yii 2 Basic Project Template",
    "keywords": ["yii2", "framework", "basic", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": "&gt;=5.4.0",
        "yiisoft/yii2": "&gt;=2.0.5",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*"

    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
    },
    "config": {
        "process-timeout": 1800
    },
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\Installer::postCreateProject"
        ]
    },
    "extra": {
        "yii\\composer\\Installer::postCreateProject": {
            "setPermission": [
                {
                    "runtime": "0777",
                    "web/assets": "0777",
                    "yii": "0755"
                }
            ],
            "generateCookieValidationKey": [
                "config/web.php"
            ]
        },
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}
</code></pre>

<p>What could have gone wrong? Anyone experiencing this?</p>