Error when building modern Web Interface

dennis mureithi2 years ago

I have downloaded the web interface source code from github and built it with npm install and npm run build. However on trying to run the final build this is the error I receive on loading the homepage.
Unexpected token '<', "<!doctype "... is not valid JSON
It seems like its expecting JSON but its receiving the index.html file, which it should since its the initial page load. What could be causing the issue?
https://drive.google.com/file/d/13oUpuOy2HWFibYYzOgpDu0xdV5SRqBMe/view?usp=sharing

Anton Tananaev2 years ago

Looks like you have some problem with the backend.

x6883992 years ago

If you use docker - you can use my image for building.
https://github.com/x821938/traccar-build-from-source

dennis mureithi2 years ago

Backend server is version 4.8 and is running fine with the old UI. Running the development server and the modern UI loads correctly.
Is it because the backend server is outdated?

Anton Tananaev2 years ago

You have to use matching versions of the server and the web app.

dennis mureithi2 years ago

Okay. I'll give it a try.
Thanks!