setBagistoVite() Error
-
Hello,
I Would appreciate some assistance on this challenge I'm experiencing in bagisto.
I keep getting this error:
Next Illuminate\View\ViewException: Call to a member function setBagistoVite() on null (View: ..../packages/Webkul/Shop/src/Resources/views/components/layouts/index.blade.php) (View: .../packages/Webkul/Shop/src/Resources/views/components/layouts/index.blade.php) in .../packages/Webkul/Theme/src/Themes.php:279I get this despite not making any changes to the code. The installation was successful but this error popped up a few days after successful operation of the site.
-
I hope you are doing great.
Can you assist us with what all steps you followed in the installation and which branch or specific version you are installing.
It would really be helpful for us as well. So that we can figure out and check the same from our end as well.Thanks
Looking ahead for your reply. -
@ashish2409 i am facing this issue also. what there error? i install bagisto with all steps following
-
Hello @saqib
Did you install the node modules ( npm install ) if yes then after that Kindly run npm run dev in your root directory of Bagisto.
Kindly check and let us know is everything working fine.
Thanks & Regards
-
@Rishabh-Webkul said in setBagistoVite() Error:
Did you install the node modules ( npm install )
only this in root directory? or shop package also?
-
@saqib said in setBagistoVite() Error:
only this in root directory? or shop package also?
any update?
-
Hello @saqib
There is a blog and tutorial video of a custom theme in which we have done the vite setup. Kindly check this out for your reference.
Blog: https://bagisto.com/en/create-custom-theme-in-bagisto/
Video: https://www.youtube.com/watch?v=K3FdBDsXAH8&ab_channel=Bagisto
Thanks & Regards
-
I know this is an older post but found this post searching for this same error I ran and though I would share my findings. I had the same error after adding a new package that had its own routes with views. It seems you will get this error when a view is rendered on a route that does not use the theme middleware. Once i added the theme middleware to my routes the exception stopped.