Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token '<' (at preline.js:1:1) #507

Open
emaduddin678 opened this issue Nov 14, 2024 · 1 comment
Open

Comments

@emaduddin678
Copy link

Summary

I am new in preline. it is awesome. In my react vite my i use a ai chat prompt. it is worknig locally fine. but in netlify I got Uncaught SyntaxError: Unexpected token '<' (at preline.js:1:1). and didn't understand why it is happening.

Steps to Reproduce

visit this page below and you can see the console.

Demo Link

https://jonhs-hopkins-chatbot.netlify.app/

Expected Behavior

image

Actual Behavior

No response

Screenshots

image
image

@olegpix
Copy link
Collaborator

olegpix commented Nov 29, 2024

@emaduddin678 Hi,
It seems the issue occurs because Preline is being called before the elements it needs to initialize are available on the page. Make sure to use the appropriate application lifecycle method to initialize Preline at the right time. For guidance, please refer to our framework-specific demos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants