How to install and run traccar-web source code ?

bob2 years ago

Hi, I'm according to the installation of the tutorial to https://www.traccar.org/build-web-app/
My system is linux, node version is v18.12.1, npm version is 9.1.2.
This is what happens when I execute the npm install command

[root@iZj6c4ppi8hkxji0vkfnwuZ traccar-web-5.4]# npm install
> postinstall
> /bin/bash -c 'mkdir -p web/lib/{ol,ol-layerswitcher,proj4,extjs} && cp node_modules/openlayers-dist/{ol.js,ol.css} web/lib/ol/ && cp node_modules/ol-layerswitcher/dist/{ol-layerswitcher.js,ol-layerswitcher.css} web/lib/ol-layerswitcher/ && cp node_modules/proj4/dist/proj4.js web/lib/proj4/ && cp node_modules/extjs-gpl/build/ext-all.js web/lib/extjs/ && mkdir -p web/lib/extjs/classic && cp -r node_modules/extjs-gpl/build/classic/locale web/lib/extjs/classic/locale && cp -r node_modules/extjs-gpl/build/classic/theme-triton web/lib/extjs/classic/theme-triton && mkdir -p web/lib/extjs/packages/charts && cp -r node_modules/extjs-gpl/build/packages/charts/classic web/lib/extjs/packages/charts/classic'

up to date, audited 139 packages in 704ms

28 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Then execute the npm start command and find that the command cannot be executed

[root@iZj6c4ppi8hkxji0vkfnwuZ traccar-web-5.4]# npm start
npm ERR! Missing script: "start"
npm ERR! 
npm ERR! Did you mean one of these?
npm ERR!     npm star # Mark your favorite packages
npm ERR!     npm stars # View packages marked as favorites
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-11-26T09_08_41_129Z-debug-0.log
Anton Tananaev2 years ago

I think you missed the very first sentence in the documentation:

Modern app is located in the modern subfolder

bob2 years ago

Thank you very much!

I've got traccar-web running on the local window system.