modern website build Failed

MEGATRACKGPS SAS2 years ago

I'm having this problem and the truth is that I've searched everywhere and I can't solve it.

LOG:

ADMI@DESKTOP-0P0CB3F MINGW64 /c/plataforma/server web/traccar-web/modern
$ npm run build

> traccar@5.3.0 build
> react-scripts build

Creating an optimized production build...
Failed to compile.

Module not found: Error: Can't resolve '../../resources/l10n/af.json' in 'C:\plataforma\server web\traccar-web\modern\src\common\components'

I understand that it is a symbolic link to the l10n folder, a windows problem, but how can I fix it?

Anton Tananaev2 years ago

There are two options:

  1. Manually create the symbolic link
  2. Configure your git client to handle symbolic links automatically and re-checkout
MEGATRACKGPS SAS2 years ago

Thank you

Could you tell me where I can get information to add the symbolic link

Anton Tananaev2 years ago

I don't use Windows, so not sure. Microsoft must have some information about it. There's probably some command line tool available.

MEGATRACKGPS SAS2 years ago

ok I understand I will continue looking if you get something of a possible solution I will be pending here anyway I will continue looking for a solution and I will meet it here

Anton Tananaev2 years ago
MEGATRACKGPS SAS2 years ago

Ready I'm going to look at where I would have to edit to make the changes

the error is here modern\src\common\components\LocalizationProvider.js

MEGATRACKGPS SAS2 years ago

the truth is not possible in windows.

My solution was to do the process npm run build , from an ubuntu terminal.

if someone has the same problem, you can work from a local pc and build on a linux server

Anton Tananaev2 years ago

It is definitely possible on Windows, but running on Linux or Mac is probably easier.

MEGATRACKGPS SAS2 years ago

if that's what I did to be successful.

My server is on VPS OVHcloud

work on windows

And build in virtual oracle

I use WinSCP to copy files between my virtual pc windows pc and again I use WinSCP to copy the files to my VPS Server