Traccar Source Code build Does not show UI after login

Carlos Mukoyi2 years ago

Hello
I have done a git clone of source code
git clone --recursive https://github.com/traccar/traccar.git

When i run the code it loads forever and throws the following error in browser when i inspect

Uncaught ReferenceError: Ext is not defined
    <anonymous> http://localhost:8082/load.js:123
    EventListener.handleEvent* http://localhost:8082/load.js:120
    <anonymous> http://localhost:8082/load.js:182
Anton Tananaev2 years ago

Did you run npm install for the web app?

Carlos Mukoyi2 years ago

Ran npm install
In the same folder that has package.json
Response

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'

The system cannot find the path specified.
npm ERR! code 1
npm ERR! path C:\Users\carlo\IdeaProjects\traccar\traccar-web
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c /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'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\carlo\AppData\Local\npm-cache\_logs\2021-11-13T18_53_07_936Z-debug.log
Carlos Mukoyi2 years ago

The browser shows the following

    Uncaught ReferenceError: Ext is not defined
    <anonymous> http://localhost:8082/load.js:123
    EventListener.handleEvent* http://localhost:8082/load.js:120
    <anonymous> http://localhost:8082/load.js:182
Carlos Mukoyi2 years ago

I have downloaded node.js and installed it
Then gone to command in directory traccar-web and run npm install and see above errors

Anton Tananaev2 years ago

The script is designed for bash, so you need something like Cygwin or Mingw to run it.

Carlos Mukoyi2 years ago

works on linux quite easy
Battled on windows never got it to work.

Carlos Mukoyi2 years ago

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'

The system cannot find the path specified.
npm ERR! code 1
npm ERR! path C:\users\carlo\desktop\Seekerweb australia\traccar\traccar-web
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c /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'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\carlo\AppData\Local\npm-cache\_logs\2021-11-16T08_14_18_622Z-debug.log