You're building the wrong app. You need to run this command from the "modern" folder.
thanks for the advice. how to replace old modern app in a installed traccar server with the one that I did ??
root@mx3:~/traccar-web/modern# PUBLIC_URL=/gps/modern npm run build
> traccar@5.0.0 build
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
826.72 kB build/static/js/main.3875e9e1.js
15.88 kB build/static/css/main.0be50f72.css
The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb
The project was built assuming it is hosted at /gps/modern/.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
Find out more about deployment here:
https://cra.link/deployment
root@mx3:~/traccar-web/modern#
The result is in the build
folder. You can copy it into your Traccar web directory.
As far as I understand, I should replace the existing files in the traccar web with those in the build, but there are no such files in the web directory of the installed traccar :( I'm confused.
Obviously there's no folder called "build". You need to replace the content of web folder with the content of the build folder.
к сожалению ничего не вышло
404: Not Found
The requested resource could not be found.
Rocket
Eu tenho a mensagem similar, porem eu estou tentando BUILD a referente pasta WEB (para substituir a LEGACY), a quando Build a Morden, vai sem qualquer problema:
translator:
I have a similar message, but I'm trying to BUILD the corresponding WEB folder (to replace LEGACY), when I Build a Modern, it goes without any problem:
Build legacy:
root@xptech:/opt/traccar/dev/traccar-web/legacy# npm run build
> build
> sencha compile --classpath=web/app.js,web/app,node_modules/extjs-gpl/packages/core/src,node_modules/extjs-gpl/packages/core/overrides,node_modules/extjs-gpl/classic/classic/src,node_modules/extjs-gpl/classic/classic/overrides exclude -all and include -recursive -file web/app.js and exclude -namespace=Ext and concatenate -closure web/app.min.js
sh: 1: sencha: not found
root@xptech:/opt/traccar/dev/traccar-web/legacy
Build modern:
root@xptech:/opt/traccar/dev/traccar-web/modern# npm run build
> traccar@5.7.0 build
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
946.99 kB build/static/js/main.d88a02fa.js
17.07 kB build/static/css/main.becf9d2c.css
The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
yarn global add serve
serve -s build
Find out more about deployment here:
https://cra.link/deployment
root@xptech:/opt/traccar/dev/traccar-web/modern#
uma observação: não existe o arquivo web/app.min.js no pacote que clonei do git.
Translator:
One note: there is no web/app.min.js file in the package I cloned from git.
For the legacy app you have to install Sencha CMD.
my server is Ubuntu Server Ubuntu 18.04.6 + VirtualMin (Apache version 2.4.29 + MySQL 5.7.41)
:D
Tanks Anton Tananaev
Dear friends! I'd like to build traccar-web with custom path but have error. please help me to fix this.