Roots Discourse

Log1x/navi plugin not showing up after composer require log1x/navi

I’m using trellis/bedrock/sage.

I’m trying to install my first plugin, it seems simple:

composer require ...

And my understanding from the documentation is it will then be ready for use in the site/web/app/plugins directory.

So, I follow the instructions at https://github.com/Log1x/navi, and it says:

composer require log1x/navi

I do that. It appears to install according to composer. Its in the composer.json but yet its not visible/usable/no trace in WordPress and also not in the site/web/app/plugins directory.

Where did I go wrong?

What lead you to believe this? The Navi docs don’t mention this.

Navi is a composer package, with the type “package” so it will be installed to the composer vendor directory. To use it, follow the instructions in the Navi readme. It’s not a WordPress plugin and won’t appear in the plugins.

1 Like

Wow, ok, a false assumption on my part. I’m so used to everything being a plugin in WordPress. Roots is new to me. Thanks for pointing that out. Navi is a package, not a plugin. That makes sense now.

Hmm… a few days later, I’ve followed the instructions exactly and used the example provided for Sage 10.

I get “Target class [navi] does not exist” from Illuminate. It isn’t working for me.

Anyone get Navi working with Sage 10?

EDIT: It appears from this conversation that it may be broken with Sage 10 for the last few months?

Hey, there, Navi definitely works with Sage 10 — I have it working in my own setup. Here’s a Gist with some working code.

As, @alwaysblank said, it’s not a WordPress plugin, so you need to include some extra files in your theme to get these composer packages to work. If you want to customize the way your navigation works, you’ll just adjust the navigation.blade.php partial.

1 Like

OMG, it’s working! Another blunder on my part. I was installing navi as a dependency in Bedrock as opposed to in Sage. No wonder it wasn’t working for me.

With navi installed into Sage, and following the instructions of your Gist, I have it working perfectly fine now. Leaving this here in case someone else makes this error too.

Thank you kindly. Much appreciated.

This topic was automatically closed after 42 days. New replies are no longer allowed.