Error in creating yii2 project with composer
<p>I want to create <strong>yii2</strong> project in windows 10. I use <code>composer create-project</code>command truly, but I against with error. </p>

<p>Here is <code>composer create-project</code> command in <strong>Command Prompt</strong>:</p>

<p><a href="https://i.stack.imgur.com/JOicT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JOicT.png" alt="enter image description here"></a></p>

<p>And of course I get the same error in <code>composer global require "fxp/composer-asset-plugin:~1.2.0"</code>:</p>

<p><a href="https://i.stack.imgur.com/rW2oV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rW2oV.png" alt="enter image description here"></a></p>

<p>I had no <code>composer.json</code> file in folder <code>C:/Users/Mohammad/AppData/Roaming/Composer</code> after installing <a href="https://getcomposer.org/Composer-Setup.exe" rel="nofollow noreferrer">composer-setup.exe</a>, and I copied <code>composer.json</code> file from one of my projects in folder <code>C:/Users/Mohammad/AppData/Roaming/Composer</code>. </p>

<p>This is my composer.json in folder <code>C:/Users/Mohammad/AppData/Roaming/Composer</code>:</p>

<pre><code>{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "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.6",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
        "franciscomaya/yii2-sceditor": "dev-master",
        "kartik-v/yii2-widget-sidenav": "*",
        "mohammad-mahdy/yii2-jdate": "*",
        "2amigos/yii2-ckeditor-widget" : "*",
        "2amigos/yii2-gallery-widget": "~1.0",
        "romka-chev/yii2-swiper" : "*",
        "kartik-v/yii2-widgets": "*",
        "kartik-v/yii2-grid": "@dev",
        "yiisoft/yii2-imagine": "*",
        "omnilight/yii2-shopping-cart": "*",
        "fxp/composer-asset-plugin": "^1.0"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"

    },
    "config": {
        "process-timeout": 1800
    },
    "extra": {
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}
</code></pre>

<p>Please help me to fix it.</p>