Reputation: 6539
I just created new Yii 2 application on Mac os. PHP version I'm using is version 7.3
. Composer install worked correctly but when I try to start the app using the command php yii serve
I get the following error.
Exception 'yii\base\InvalidConfigException' with message 'Failed to instantiate component or class "yii\gii\Module".'
in /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/di/Container.php:449
Stack trace:
#0 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/di/Container.php(374): yii\di\Container->getDependencies('yii\\gii\\Module')
#1 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container->build('yii\\gii\\Module', Array, Array)
#2 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('yii\\gii\\Module', Array, Array)
#3 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/base/Module.php(427): yii\BaseYii::createObject(Array, Array)
#4 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/base/Application.php(315): yii\base\Module->getModule('gii')
#5 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/base/Application.php(273): yii\base\Application->bootstrap()
#6 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/console/Application.php(124): yii\base\Application->init()
#7 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\console\Application->init()
#8 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#9 /Users/krishnadas/Desktop/thejas/lms/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#10 /Users/krishnadas/Desktop/thejas/lms/yii(19): yii\console\Application->__construct(Array)
#11 {main}
When I run composer update I get more errors like this
ailed to extract yiisoft/yii2-bootstrap: (9) unzip -qq '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-26e4a5cb7b14ec2c9244cc7f29b77c9d' -d '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/63a3aea5'
unzip: cannot find or open /Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-26e4a5cb7b14ec2c9244cc7f29b77c9d.
This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
Failed to extract yiisoft/yii2-debug: (9) unzip -qq '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-ee4e9bc3f65bc1e6d3bb29c47448147f' -d '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/c3a14115'
unzip: cannot find or open /Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-ee4e9bc3f65bc1e6d3bb29c47448147f.
This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
Failed to extract yiisoft/yii2-faker: (9) unzip -qq '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-adfed1b28e8eb6386664db1dc98849ab' -d '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/d8990f9a'
unzip: cannot find or open /Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-adfed1b28e8eb6386664db1dc98849ab.
This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
Failed to extract yiisoft/yii2-gii: (9) unzip -qq '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-a51d0a4cc1fef91725fe727eb3a41a43' -d '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/eaed0437'
unzip: cannot find or open /Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-a51d0a4cc1fef91725fe727eb3a41a43.
This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
Failed to extract yiisoft/yii2-swiftmailer: (9) unzip -qq '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-d3e0c5f68aded7a5357259ffde56f5ea' -d '/Users/krishnadas/Desktop/thejas/basic/vendor/composer/3514a4ce'
unzip: cannot find or open /Users/krishnadas/Desktop/thejas/basic/vendor/composer/tmp-d3e0c5f68aded7a5357259ffde56f5ea.
This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix`
Upvotes: 1
Views: 3728
Reputation: 171
I update composer on the mac and fix the problem. After install just
composer update
Upvotes: 0
Reputation: 6539
It finally worked when I downgraded composer to the latest stable version 1.10.7
. Version 2
has issues with some of the install items such as gii
.
Upvotes: 2