© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Arko

Importing a js lib via Async Alpine

I'm loading an Alpine component asynchronously, however now my lib import doesn't work anymore:

import Tribute from "tributejs";
import Tribute from "tributejs";

Gives me this error:
Uncaught (in promise) TypeError: Failed to resolve module specifier "tributejs". Relative references must start with either "/", "./", or "../".
Uncaught (in promise) TypeError: Failed to resolve module specifier "tributejs". Relative references must start with either "/", "./", or "../".

Now tossing in the full relative path import Tribute from
"../../../../node_modules/tributejs/dist/tribute.esm.js";
"../../../../node_modules/tributejs/dist/tribute.esm.js";
also doesn't work since its loaded via http, so it'd try to load this: https://my-app.test/node_modules/tributejs/dist/tribute.esm.js which obviously wouldnt work. Do I need to somehow compile this tributejs into public for this to work with async alpine?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Importing custom Alpine data
FilamentFFilament / ❓┊help
3y ago
Alpine Async import module
FilamentFFilament / ❓┊help
13mo ago
Alpine js error, navigation group
FilamentFFilament / ❓┊help
16mo ago
How can I install Alpine.js?
FilamentFFilament / ❓┊help
2y ago