Help with modern UI Source

rowl3y a year ago

Hi. I'm running version 6.6 & trying to edit the modern UI files.

But i cart find them ?

Thanks

Track-trace a year ago

How about https://github.com/traccar/traccar-web/tree/master/src

src/components: Contains various React components used throughout the application.

src/pages: Contains the different page components that make up the web interface.

src/routes: Defines the routing for the application, determining which components are rendered for different URLs.

src/App.js: The main application file that sets up the overall structure and routing.

You can ask Ai these days.

rowl3y a year ago

Yeh I think im struggling to install it

Track-trace a year ago
rowl3y a year ago

Yes this is the issue . When I run npm start

I get this

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /root/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/root/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2025-02-08T14_14_44_247Z-debug-0.log```
rowl3y a year ago

Ai things im using Traccar 6.6 Classic UI

But still cart find the files it asking for.

/opt/traccar/web

Track-trace a year ago

Well you should run the command : npm run build

From the root of the installed directory.

You can clearly see package.json is included in the package which you download.

https://github.com/traccar/traccar-web

And did you read about this ? https://github.com/traccar/traccar-web/tree/master/src

Cristian a year ago

just a note, if you are working with version 6.6 you must download those files and not those of the master branch.
https://github.com/traccar/traccar-web/tree/v6.6

Track-trace a year ago

Yes and when you unpack v.6.6 you can also see package.json is included, so you are running the command from the wrong directory.

rowl3y a year ago

Still lost here

npm start

> traccar@6.6.0 start
> vite

sh: 1: vite: not found
root@vps-e3f0a0ea:/opt/traccar/traccar-web# 

or in to root

Anton Tananaev a year ago

Have you done npm install?

rowl3y a year ago

ok so i download the https://github.com/traccar/traccar-web/tree/v6.6

and unztip to /opt/traccar/

then run

cd /opt/traccar/
npm start

Anton Tananaev a year ago

That's obviously incorrect in many ways. Make sure you read the documentation carefully.

rowl3y a year ago
vite v5.4.11 building for production...
✓ 2460 modules transformed.
rendering chunks (1)...Killed
root@vps-e3f0a0ea:/opt/traccar-web# sudo cp -r dist /opt/traccar/web
cp: cannot stat 'dist': No such file or directory
rowl3y a year ago

Anyone help me here ?

Still stuck on the same part
rendering chunks (1)...Killed