Getting this error when initializing wails in main.jsx file:
import React from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.jsx'
import './index.css'
import * as Wails from '@wailsapp/runtime';
const root = createRoot(
document.getElementById('root')
);
Wails.Init(() => {
root.render(
<App />)
})
but it throws an error TypeError: undefined is not an object (evaluating 'window.wails._.Init')
Wanted to init wails to use this:
useEffect(() => {
Wails.Events.On("checker:checked", event => {
console.log(event)
});
}, []);
where i also got an error
TypeError: undefined is not an object (evaluating 'window.wails.Events.OnMultiple')
Also i noticed that i have libwebkit installed
sudo apt install libwebkit2gtk-4.0-devThe newest version of libwebkit2gtk-4.0-dev (2.44.2-0ubuntu0.22.04.1) is already installed. 0 packages were updated, 0 new packages were installed, 0 packages were marked for removal, and 25 packages were not updated.
But in wails doctor i get | libwebkit | libwebkit2gtk-4.0-dev | Available | 2.44.2-0ubuntu0.22.04.1 |
Required package(s) installation details:
Description
Getting this error when initializing wails in main.jsx file:
but it throws an error
TypeError: undefined is not an object (evaluating 'window.wails._.Init')
where i also got an error
TypeError: undefined is not an object (evaluating 'window.wails.Events.OnMultiple')
Also i noticed that i have libwebkit installed
sudo apt install libwebkit2gtk-4.0-dev
The newest version of libwebkit2gtk-4.0-dev (2.44.2-0ubuntu0.22.04.1) is already installed. 0 packages were updated, 0 new packages were installed, 0 packages were marked for removal, and 25 packages were not updated.
But in wails doctor i get | libwebkit | libwebkit2gtk-4.0-dev | Available | 2.44.2-0ubuntu0.22.04.1 | Required package(s) installation details:To Reproduce
Expected behaviour
Just a loaded page
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response