Skip to content

Return value of Spatie\Once\Backtrace::getObject() must be an instance of Spatie\Once\mixed, instance of Laravel\Nova\Http\Requests\NovaRequest returned #3187

Closed Answered by FaridAghili
andresilvagomez asked this question in Q&A
Discussion options

You must be logged in to vote

This happened to me when I was developing on my local machine with PHP 8 installed, and deployed the project to shared hosting which had PHP 7.4 installed.
Notice that, I copied whole Laravel project, including vendor folder to remote host and didn't run composer install on the remote host.

In fact, on my local machine spatie/once v3 got installed by composer (which requires PHP 8), and PHP 8 wasn't available on my hosting.

If you're doing the same, I suggest to install PHP 7.* on your local machine, run composer update, then deploy to server.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by crynobone
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@henryavila
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #3170 on January 22, 2021 04:29.