Just found my problem, I had an expression that depends of a variable at .env, and I forgot to define it.
So, the expression was null, that was what created the error.
I didn’t know that the command “php artisan” tries to initialize all the classes, and other parts of my system just works fine, it was just confusing not to know where the error was.