Issue when i run build in modern-app

BornConfuseda year 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 Tananaeva year ago

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

BornConfuseda year 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 Tananaeva year ago

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

BornConfuseda year ago

Makes sense, it worked!!!!

AlexGa year 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 Tananaeva year ago

You cannot host Traccar on a normal web hosting.

AlexGa year 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 Tananaeva year ago

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

AlexGa year 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 Tananaeva year ago

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

AlexGa year ago

So need to run the commands for Linux vps installation?

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