fdusautoir's avatar

Not hint path defined for [livewire]

Hi everyone,

My app works really well in local environment put when I put it on production on pages which uses Livewire pagination, I have this error : https://flareapp.io/share/KPgDZ1q7#F64

For me, this is not a question to put the package provider on the config/app or to add something on the AppServiceProvider. This is an issue which have to be resolve, not bypass 😉

If if do, dd($this->hints) in this parseNamespaceSegments method to debug, I can see that there is an empty array.

It seems like the loadViewsFrom uses in all packages were not called. In fact, it is partially called. If I do a dd in the Illuminate\Support\ServiceProvider::loadViewsFrom() method, I can work my output but when I do a dd in the callAfterResolving hook inside this function, nothings appends.

This is the Illuminate\Support\ServiceProvider::loadViewsFrom() method :


/**
     * Register a view file namespace.
     *
     * @param  string|array  $path
     * @param  string  $namespace
     * @return void
     */
    protected function loadViewsFrom($path, $namespace)
    {
        $this->callAfterResolving('view', function ($view) use ($path, $namespace) {
            if (isset($this->app->config['view']['paths']) &&
                is_array($this->app->config['view']['paths'])) {
                foreach ($this->app->config['view']['paths'] as $viewPath) {
                    if (is_dir($appPath = $viewPath.'/vendor/'.$namespace)) {
                        $view->addNamespace($namespace, $appPath);
                    }
                }
            }

            $view->addNamespace($namespace, $path);
        });
    }


What can be the reason of this problem ?

My local and production environments seems to be the same. Same version of PHP, same version of Laravel.

Thanks for your help.

0 likes
1 reply
fdusautoir's avatar
fdusautoir
OP
Best Answer
Level 11

This is solved. In my app, I use blade icons and the path for a set was not found (it loaded a folder in node_modules). Any error message about this ... Then, others packages namespace were not loaded because of this.

Please or to participate in this conversation.