Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to instantiate component or class "rmrevin\yii\fontawesome\NpmFreeAssetBundle". #55

Open
shivendrahandysolver opened this issue Jun 11, 2020 · 3 comments

Comments

@shivendrahandysolver
Copy link

shivendrahandysolver commented Jun 11, 2020

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

@engmohamedamer
Copy link

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.

@rmrevin
Copy link
Owner

rmrevin commented Jun 27, 2020

@shivendrahandysolver Unfortunately, I can’t control the package version in third-party projects. Try manually fixing the version of the yii2-fontawesome package.

@weblsa
Copy link

weblsa commented Aug 12, 2023

Try it

  1. \rmrevin\yii\fontawesome\AssetBundle::register($this);
  2.  public $depends = [
     ...,
     'rmrevin\yii\fontawesome\AssetBundle',
    
    ];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants