Search code examples
phpyiicomposer-php

How to install composer.json in Yii1 project?


i have an existing Yii1 project but without the assets folder. So only the folders: css, images, protected.

So I made just an empty composer.json file in the root directory. And I did a

composer install

But then I get this error:

 "./composer.json" does not contain valid JSON
  Parse error on line 1:

  ^
  Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

And yes, of course I have read the offical documentation for composer:

https://getcomposer.org

But I can't find how I then can run composer install.

Thank you


Solution

  • Oke, I used a existing composer.json file for Yii1 from github and now it has installed the vendor folder