Custom logo and default icon

Alex3 years ago

Hi all.
First time installing traccar. I do this on a EC2 AWS instance just for test it. Everything ok
I wanna use my own svg logo on login screen, and set a bicicle as default icon for new devices. So, in my main server (32gb ram on OVH) i clone the git, change logo.svg and then ./gradlew assemble then i copy /target/traccar-server.jar to my test server..
Im still seen traccar logo on login screen.
I didnt find any documentation about this, i search all across this forum but i didnt find any good tutorial or some info about it.
If anyone can help...
Thanks you.

Anton Tananaev3 years ago

You need to compile and update the web app:

https://www.traccar.org/build-web-app/

Alex3 years ago

it fails on react-scripts build when i npm run build

root@rastreo:~/traccar/traccar-web/modern# npm run build

> traccar@5.3.0 build /root/traccar/traccar-web/modern
> react-scripts build

sh: 1: react-scripts: not found

npm ERR! Linux 5.4.0-1083-aws
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! traccar@5.3.0 build: `react-scripts build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the traccar@5.3.0 build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the traccar package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs traccar
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls traccar
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/traccar/traccar-web/modern/npm-debug.log
Anton Tananaev3 years ago

Have you done the npm install?

Alex3 years ago
root@rastreo:~/traccar/traccar-web# npm install
npm ERR! Linux 5.4.0-1083-aws
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /root/traccar/traccar-web/npm-debug.log

As i said, i just change logo.svg, favicon and icon. nothing else

Anton Tananaev3 years ago

You should probably update the tools you're using. NPM v3.5.2 is 7 years old. Node is also pretty ancient.

Alex3 years ago

This fix my issue. Thanks you. I was ussing default nvm

Anton Tananaev3 years ago

It probably means you should upgrade your operating system as well.