0
Not a bug

Uncaught SyntaxError: Unexpected token '<' (at vhost_embed_functions_v4.php?acc=5626448&js=1:1:1)

mustafa abdelkawy16 5 months ago updated by Gil Sideman 1 day ago 10

Uncaught SyntaxError: Unexpected token '<' (at vhost_embed_functions_v4.php?acc=5626448&js=1:1:1)
I get an error when adding sitepal in nextjs app.
it did work and suddenly not works

Image 237

Answer

Answer

Hello Mustafa - 

We've put together a NextJS technical example, which includes full source code.


The example can be found here -

https://sitepal.com/api/examples/nextjs/index.html

(there is a download source code button in the example)

Please download the example sources and build it out.

Note: As you do - make sure you replace our embedded avatar with your own so that it will work on your licensed domains.

I hope this is helpful to you and other NextJS developers

Regards,

Gil

I run it locally
it works if it's published

Hello Mustafa - 

When you run the nextjs build locally - does the build fail on localhost but then work on your live page?

Mustafa - 

And when the build is created - if you run it on localhost does it work?


Just to let you know, our team is building a nextjs example to see if we can recreate the problem. This may take a couple of days given other priorities. I'll let you know.

Regards,

Gil

Under review

Hello Mustafa !

Can you share a link to your page where the problem can be seen?

Also pls advise which platform/browser you are using.

If you prefer - pls send the information to support@sitepal.com & we will advise asap

Thanx

https://management-lovat.vercel.app/

it's working on website. But it is not working on localhost gives me the error i sent. I tried it in chrome and Microsoft edge.


Answer

Hello Mustafa - 

We've put together a NextJS technical example, which includes full source code.


The example can be found here -

https://sitepal.com/api/examples/nextjs/index.html

(there is a download source code button in the example)

Please download the example sources and build it out.

Note: As you do - make sure you replace our embedded avatar with your own so that it will work on your licensed domains.

I hope this is helpful to you and other NextJS developers

Regards,

Gil

Hello Mustafa,

Can you check and advise whether you still encounter the problem when running the code from our new nextJS example? 

Thnk you,

Gil

Hello Mustafa,

As we were never able to recreate the issue directly & have just published a source code example in NextJS that does not seem to suffer from this problem, we're considering the issue closed. 

If you still encounter a problem - please send us a note to support@sitepal.com and we will look into it.

Regards,

Gil

The SitePal Team