-1

I'm trying to run front end of the Age-viewer-go

on ubuntu 22.04

using the wails dev command in age-viewer folder of the project.

but it gives the following error as shown in the image

failed to find the Vite server URL

image showing error

2 Answers2

1

Firstly, from the age-viewer/frontend directory run npm install react-router-dom.

The issue could be due to vite server port assignment. For that try using a custom port for vite:

  • Go to age\age-viewer\frontend\vite.config.js
  • add
    plugins: [react()],
    server: {
       port: 8000,
    }
    

The error could also be due to some problem with the frontend because after compiling the frontend wails is running npm run dev from the wails.json. Try running the frontend separately to test if it is working correctly.

To do that run:

  • cd age-viewer/frontend
  • npm run dev
Ahmar
  • 584
  • 2
  • 7
1

According to your error, you can try the following troubleshooting steps:

  1. First of all, ensure that Vite is correctly installed. In your terminal, run:
npx vite --version 
OR 
yarn vite --version
  1. Start the server manually. Run (from the root of your directory:
npm vite 
OR 
yarn vite

This should start the server and print its URL.

  1. Check your configuration in wails.json to ensure that frontend corresponds to correct Vite URL and port.

  2. Ensure that port is available. Check using:

lsof -i tcp:<port_number>
  • If any of the above doesn't work, try rebuilding your project by deleting and reinstalling node_modules.
Safi50
  • 379
  • 1
  • 7