"Unknown option -m" when running GTK4 + GJS Book example

I’m following GTK4 + GJS Book and I finished Creating the Project. Trying “flatpak run name” gives me “Unknown option -m” but gjs has “-m” option. I’m with Fedora Linux 38 (Workstation Edition). What am I missing and how can I debug such problems?

Are you sure that you got the correct org.gnome.Platform version in your Flatpak manifest?
Try replacing the -m with --version to check whether you got the right GJS version.

Thank for replying!

Changing the -m wiht --version like this:

#!@GJS@ --version

gives me again:

Unknown option --version

This is my manifest:

“app-id” : “me.proton.urtsi.santsi.filebrowser”,
“runtime” : “org.gnome.Platform”,
“runtime-version” : “44”,
“sdk” : “org.gnome.Sdk”,
“command” : “me.proton.urtsi.santsi.filebrowser”,

"finish-args" : [

"cleanup" : [

"modules" : [
        "name" : "filebrowser",
        "buildsystem" : "meson",
        "sources" : [
                "type" : "dir",
                "path" : "."


And I have installed:

GNOME Application Platform version 44
GNOME Software Development Kit version 44

That strongly suggests that the substitution of @GJS@ is not working. Can you provide the relevant bits from your meson.build?

I don’t think I made any intentional changes compared to the book, except for the meson_version and APP_ID.


Define our project

version: ‘0.0.1’,
license: [‘GPL-3.0-or-later’],
meson_version: ‘>= 0.62.0’

APP_ID = ‘me.proton.urtsi.santsi.filebrowser’

Import the modules

gnome = import(‘gnome’)

Load instructions from subdirectories



Configure the entry point

input : APP_ID + ‘.js’,
output : APP_ID,
configuration: {
‘GJS’: find_program(‘gjs’).full_path(),
‘PACKAGE_VERSION’: meson.project_version(),
‘PREFIX’: get_option(‘prefix’),
‘LIBDIR’: get_option(‘prefix’) / get_option(‘libdir’)
install_dir: get_option(‘bindir’),
install_mode: ‘rwxr-xr-x’

Compile the resources

app_resource = gnome.compile_resources(
APP_ID + ‘.src’,
APP_ID + ‘.src.gresource.xml’,
gresource_bundle: true,
install: true,
install_dir : get_option(‘datadir’) / APP_ID


Compile the resources

APP_ID + ‘.data’,
APP_ID + ‘.data.gresource.xml’,
gresource_bundle: true,
install: true,
install_dir: get_option(‘datadir’) / APP_ID