Failed to instantiate component or class "rmrevin\yii\fontawesome\NpmFreeAssetBundle".
shivendrahandysolver opened this issue · comments
I was installing yii-starter-kit/yii2-file-kit and this package was installed as a dependency.
It is giving me this error
Failed to instantiate component or class "rmrevin\yii\fontawesome\NpmFreeAssetBundle".
↵
Caused by: ReflectionException
Class rmrevin\yii\fontawesome\NpmFreeAssetBundle does not exist
If manually download the missing file then I get a different error.
Invalid Argument – yii\base\InvalidArgumentException
The file or directory to be published does not exist: /var/www/site/vendor/fortawesome/font-awesome
Hello @shivendrahandysolver
you can downgrade yii file kit to the old version and the problem will be solved
composer require "require yii2-starter-kit/yii2-file-kit:2.0.1"
it worked for me.
@shivendrahandysolver Unfortunately, I can’t control the package version in third-party projects. Try manually fixing the version of the yii2-fontawesome
package.
Try it
- \rmrevin\yii\fontawesome\AssetBundle::register($this);
-
];
public $depends = [ ..., 'rmrevin\yii\fontawesome\AssetBundle',