But now we are trying to use another library but we now again get the message; Unable to locate a class or view for component [phosphor-instagram-logo-light]
We did include the library with; composer require codeat3/blade-phosphor-icons
Did you solve this problem?
I had some problems to installing blade-ui-kit/blade-icons package and got the same error.
Fixed by:
Install with composer require blade-ui-kit/blade-icons in sage theme root folder, not bedrock root folder.
Create folder called config in theme root folder
Run wp acorn package:discover or else package config might not be detected/able to publish config-file
Run wp acorn vendor:publish --tag=blade-icons to publish config file to config folder.
In config -file, uncomment everything and let path be resources/svg and create that folder in resources (or change if you want).
In bud.config.mjs add svg to assets array like this .assets(["images","svg"]) (if you chose to create the svg -folder)
Run wp acorn config:clear in theme root folder.
Add your icons/svg -files to resources/svg
Run yarn build and yarn dev
Run wp acorn optimize
Run wp acorn icons:cache
Use <x-icon-name_of_svg_file /> to display the icon.
Donāt know if all this is necessary but it worked for me.
And instead of installing an entire icon library now you can download individual icons from those packages and just put them in your svg-folder and save some loading time. Or if you want a entire package you could still try above steps except with that package. But first remove the blade-ui-kit/blade-icons package as it is already included in the other packages I believe.
When attempting to remove blade-ui-kit/blade-icons composer said that the removal failed because blade-ui-kit/blade-heroicons requires it - however, upon inspection it was actually removed and the icons seemed to work anyways. I also attempted to add it back and it still works in that case too.
wp acorn optimize & wp acorn icons:cache do get things working
The debugger kept complaining that it couldnāt find āheroicons-s-documentā in the ādefaultā set. So, I assumed that it just wasnāt being picked up through the composer install. I manually added a new set for heroicons and pointed it at heroicons in the vendor directory, i doubt this is the proper way to do it, but it works.
I understand that this is closed along time ago but Iāve tried to do my homework before posting for support. I have read the āuse blade iconsā doc.
My steps
Ran the first 3 steps of the solution and also installed heroicons via composer require blade-ui-kit/blade-heroicons
then: wp acorn optimize:clear wp acorn package:discover Discovered Package: blade-ui-kit/blade-icons Discovered Package: nesbot/carbon wp acorn vendor:publish
Which provider or tagās files would you like to publish?:
[0] Publish files from all providers and tags listed below
0
Unable to locate publishable resources.
Running: wp acorn vendor:publish --tag=blade-icons results in unable to locate publishable resources
The folder and svg icons for the heroicons gets published correctly on yarn build and āblade-ui-kit/blade-iconsā: ā^1.7ā, appears within composer.json
And this is the error in the browser when trying to render the WP page: Unable to locate a class or view for component [heroicon-o-arrow-left]...
Is this a basic resource location path issue or something else?
This is an old setup
10.0.0-beta.1
acorn to 2.0.0-alpha.0
Node 12.14.0
Local by Flywheel