Issue when i run build in modern-app

BornConfused 2 years 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 Tananaev 2 years ago

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

BornConfused 2 years 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 Tananaev 2 years ago

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

BornConfused 2 years ago

Makes sense, it worked!!!!

AlexG 2 years 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 Tananaev 2 years ago

You cannot host Traccar on a normal web hosting.

AlexG 2 years 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 Tananaev 2 years ago

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

AlexG 2 years 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 Tananaev 2 years ago

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

AlexG 2 years ago

So need to run the commands for Linux vps installation?

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