Pairing Traccar Web and Server

JordanReighn2 years ago

Hi Traccar!

I have the two projects currently running on my machine, the Modern React App in Visual Studio Code, and the server in IntelliJ.

I have made a new API end point as per your turtorial on YouTube Link

The server runs, the endpoint works perfectly. However now, when I run my React App, I get a compiled with problems. And a long list of erros saying Module not found: Error: Can't resolve '../../resources/l10n/sv.json'

Can someone please help point me into the correct direction?

Anton Tananaev2 years ago

What OS are you using? Check if ../../resources/l10n symlink is working.

JordanReighn2 years ago

I am using Windows 10, I see in a lot of your replies you recommend the latest version of Ubuntu.
How would I do this? Check if ../../resources/l10n symlink is working

Anton Tananaev2 years ago

Try opening it in a file manager?

JordanReighn2 years ago

The following structure I have inside there is only, could something be missing?
Resources

images
l10n

Anton Tananaev2 years ago

Have you checked if you have sv.json inside l10n? I'm trying to give you some pointers, but you also have to turn on common sense.

JordanReighn2 years ago

I can understand the frustration however the source code I have here is exactly what is posted on your website, the closest object to sv.json I have is sv-SE.json which is inside the node-modules folder

Anton Tananaev2 years ago

So, there's nothing inside l10n? It means that symlink didn't work. You need to fix it. It should point to web/l10n.

Anton Tananaev2 years ago

Did you use git to checkout source code? There should be an option to enable links:

https://stackoverflow.com/a/65563980/2548565

JordanReighn2 years ago

Inside web/l10n I just have text pointing to ../../../web/l10n

JordanReighn2 years ago

Could it not be that windows is not able to pickup that file correctly as it has no extension? I am in the process of creating an Ubuntu Virtual Machine

Shridhara year ago

Hello JordanReighn I am facing same issues.
Did you get how to solve that problem?

David Menaa year ago

If you cloned the repo in windows, the folder l10n gets created in the /modern/web directory. The only thing you need to do is cut it and paste it where it should be, which is /modern/src/resources

Anton Tananaeva year ago

the folder l10n gets created in the /modern/web directory

We already changed that. No need to copy anything.

David Menaa year ago

Anton Tananaev, you might have fixed it in the repo yes. But this is an issue when cloning the repo (traccar server, even though you add the recursive param), so thats why I suggested it. Its easier than getting into symbolic links don't you think?