skip to Main Content

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

Answers


  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 ageage-viewerfrontendvite.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
    Login or Signup to reply.
  2. 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 :<port_number>
    
    • If any of the above doesn’t work, try rebuilding your project by deleting and reinstalling node_modules.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search