Issue when i run build in modern-app

BornConfused10 months ago

Frist I did:

npm run build

on traccar-master/traccar-web/modern.
Then, I did (in the same folder - modern)

npm install serve
serve -s .\build\

And returned for me this error:

Unexpected token '<', "<!DOCTYPE "... is not valid JSON

What i did wrong?

Thanks in advance.

Anton Tananaev10 months ago

You have to serve Traccar from the proper backend. You can just host a web app without anything else.

BornConfused10 months ago

I'm using the Windows Traccar Server, so how can I send my build to the server? I tried replacing but there were no changes on the server.

Anton Tananaev10 months ago

Replacing should work. Obviously you have to make sure that you cleared any cache.

BornConfused10 months ago

Makes sense, it worked!!!!

AlexG9 months ago

Hello to all, as im new and slightly confused.

i have webserver with cpanel, i simply can host web app (www site) without Linux or windows server installation?

And how to do it, which files should use?

Thanks in advance

Anton Tananaev9 months ago

You cannot host Traccar on a normal web hosting.

AlexG9 months ago

Ohh, You mean i can't add it as page only right?

If server has sites panel like cpanel or webuzo, and i run the Linux commands i can still using both right?

And after Linux vps installation, i saw the video goes directly at ip:80xx and from where can change visuals, logos fuctions etc?

Anton Tananaev9 months ago

You can run different website in parallel with correct configuration on your web server.

AlexG9 months ago

Maybe i didn't tell it correctly.
i have whm like panel, so i can create site accounts with different domains etc if you mean that with "different website"

So i create domain traccar.org for example and o can place there web portal files and will work?

Anton Tananaev9 months ago

No, it won't. See my previous comment.

AlexG9 months ago

So need to run the commands for Linux vps installation?

And after that how i can modify the appearance, logos names translations etc?