nystudio107 / craft-instantanalytics

DEPRECATED: Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
https://nystudio107.com/
Other
20 stars 9 forks source link

Failed to instantiate component or class "nystudio107\pluginvite\services\VitePluginService". #65

Closed smockensturm closed 2 years ago

smockensturm commented 2 years ago

ReflectionException: Class nystudio107\pluginvite\services\VitePluginService does not exist in /app/vendor/yiisoft/yii2/di/Container.php:507 Stack trace:

0 /app/vendor/yiisoft/yii2/di/Container.php(507): ReflectionClass->__construct('nystudio107\plu...')

1 /app/vendor/yiisoft/yii2/di/Container.php(385): yii\di\Container->getDependencies('nystudio107\plu...')

2 /app/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('nystudio107\plu...', Array, Array)

3 /app/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('nystudio107\plu...', Array, Array)

4 /app/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Array)

5 /app/vendor/yiisoft/yii2/base/Module.php(769): yii\di\ServiceLocator->get('vite', false)

6 /app/vendor/yiisoft/yii2/di/ServiceLocator.php(74): yii\base\Module->get('vite')

7 /app/vendor/nystudio107/craft-instantanalytics/src/InstantAnalytics.php(255): yii\di\ServiceLocator->__get('vite')

8 [internal function]: nystudio107\instantanalytics\InstantAnalytics->nystudio107\instantanalytics{closure}(Object(yii\base\Event))

9 /app/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(yii\base\Event))

10 /app/vendor/yiisoft/yii2/base/Component.php(642): yii\base\Event::trigger('craft\web\twig\...', 'init', Object(yii\base\Event))

11 /app/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php(136): yii\base\Component->trigger('init')

12 /app/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\twig\variables\CraftVariable->init()

13 /app/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php(123): yii\base\BaseObject->__construct(Array)

14 /app/vendor/craftcms/cms/src/web/twig/Extension.php(1533): craft\web\twig\variables\CraftVariable->__construct()

15 /app/vendor/twig/twig/src/ExtensionSet.php(329): craft\web\twig\Extension->getGlobals()

16 /app/vendor/twig/twig/src/Environment.php(927): Twig\ExtensionSet->getGlobals()

17 /app/vendor/twig/twig/src/Environment.php(947): Twig\Environment->getGlobals()

18 /app/vendor/twig/twig/src/Template.php(378): Twig\Environment->mergeGlobals(Array)

19 /app/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)

20 /app/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)

21 /app/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)

22 /app/vendor/craftcms/cms/src/web/View.php(408): Twig\Environment->render('settings/plugin...', Array)

23 /app/vendor/craftcms/cms/src/web/View.php(461): craft\web\View->renderTemplate('settings/plugin...', Array)

24 /app/vendor/craftcms/cms/src/web/Controller.php(201): craft\web\View->renderPageTemplate('settings/plugin...', Array, 'cp')

25 /app/vendor/craftcms/cms/src/controllers/TemplatesController.php(102): craft\web\Controller->renderTemplate('settings/plugin...', Array)

26 [internal function]: craft\controllers\TemplatesController->actionRender('settings/plugin...', Array)

27 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)

28 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)

29 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('render', Array)

30 /app/vendor/craftcms/cms/src/web/Application.php(287): yii\base\Module->runAction('templates/rende...', Array)

31 /app/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)

32 /app/vendor/craftcms/cms/src/web/Application.php(272): yii\web\Application->handleRequest(Object(craft\web\Request))

33 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))

34 /app/public/index.php(21): yii\base\Application->run()

35 {main}

Next yii\di\NotInstantiableException: Failed to instantiate component or class "nystudio107\pluginvite\services\VitePluginService". in /app/vendor/yiisoft/yii2/di/Container.php:509 Stack trace:

0 /app/vendor/yiisoft/yii2/di/Container.php(385): yii\di\Container->getDependencies('nystudio107\plu...')

1 /app/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('nystudio107\plu...', Array, Array)

2 /app/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('nystudio107\plu...', Array, Array)

3 /app/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Array)

4 /app/vendor/yiisoft/yii2/base/Module.php(769): yii\di\ServiceLocator->get('vite', false)

5 /app/vendor/yiisoft/yii2/di/ServiceLocator.php(74): yii\base\Module->get('vite')

6 /app/vendor/nystudio107/craft-instantanalytics/src/InstantAnalytics.php(255): yii\di\ServiceLocator->__get('vite')

7 [internal function]: nystudio107\instantanalytics\InstantAnalytics->nystudio107\instantanalytics{closure}(Object(yii\base\Event))

8 /app/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(yii\base\Event))

9 /app/vendor/yiisoft/yii2/base/Component.php(642): yii\base\Event::trigger('craft\web\twig\...', 'init', Object(yii\base\Event))

10 /app/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php(136): yii\base\Component->trigger('init')

11 /app/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\twig\variables\CraftVariable->init()

12 /app/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php(123): yii\base\BaseObject->__construct(Array)

13 /app/vendor/craftcms/cms/src/web/twig/Extension.php(1533): craft\web\twig\variables\CraftVariable->__construct()

14 /app/vendor/twig/twig/src/ExtensionSet.php(329): craft\web\twig\Extension->getGlobals()

15 /app/vendor/twig/twig/src/Environment.php(927): Twig\ExtensionSet->getGlobals()

16 /app/vendor/twig/twig/src/Environment.php(947): Twig\Environment->getGlobals()

17 /app/vendor/twig/twig/src/Template.php(378): Twig\Environment->mergeGlobals(Array)

18 /app/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)

19 /app/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)

20 /app/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)

21 /app/vendor/craftcms/cms/src/web/View.php(408): Twig\Environment->render('settings/plugin...', Array)

22 /app/vendor/craftcms/cms/src/web/View.php(461): craft\web\View->renderTemplate('settings/plugin...', Array)

23 /app/vendor/craftcms/cms/src/web/Controller.php(201): craft\web\View->renderPageTemplate('settings/plugin...', Array, 'cp')

24 /app/vendor/craftcms/cms/src/controllers/TemplatesController.php(102): craft\web\Controller->renderTemplate('settings/plugin...', Array)

25 [internal function]: craft\controllers\TemplatesController->actionRender('settings/plugin...', Array)

26 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)

27 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)

28 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('render', Array)

29 /app/vendor/craftcms/cms/src/web/Application.php(287): yii\base\Module->runAction('templates/rende...', Array)

30 /app/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)

31 /app/vendor/craftcms/cms/src/web/Application.php(272): yii\web\Application->handleRequest(Object(craft\web\Request))

32 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))

33 /app/public/index.php(21): yii\base\Application->run()

34 {main}

smockensturm commented 2 years ago

Had to install your Vite plugin explicitly to get this to work. (We don't have any of your other plugins installed fwiw.) Might want to check your Instant Analytics composer.json Thanks.

joshuabaker commented 2 years ago

@khalwat This just randomly blew up one of our deployments, which we’re still trying to resolve. Might be worth jumping on this before others are impacted.

khalwat commented 2 years ago

Addressed in: https://github.com/nystudio107/craft-instantanalytics/commit/3a3ce6e97a1ab610ae36fd304f9d4ef5a6441838

Released as 1.1.15 -> https://github.com/nystudio107/craft-instantanalytics/releases/tag/1.1.15

joshuabaker commented 2 years ago

Speedy. Thanks, Andrew. 🙏🏻

khalwat commented 2 years ago

Sorry about that. I missed it because an error wasn't thrown locally (because I have craft-plugin-vite installed from my other plugins). Apologies.