Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
1.75k stars 94 forks source link

App.config is not a function error #337

Closed j0sko closed 4 months ago

j0sko commented 4 months ago

Running ags throws

(com.github.Aylur.ags:8995): Gjs-WARNING **: 10:22:08.784: JS ERROR: TypeError: App.config is not a function
@file:///home/j0sko/.config/ags/config.js:10:5
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Here is the code, copied from wiki:

const myLabel = Widget.Label({
    label: 'some example content',
});
const myBar = Widget.Window({
    name: 'bar',
    anchor: ['top', 'left', 'right'],
    child: myLabel,
});

App.config({ windows: [myBar] });

I used the arch package if it is relevant (not built from source)

Aylur commented 4 months ago

your ags is out of date, App.config was added quite recently you can use the old version

export default {
  windows: [myBar]
}