(Repost, because the sub-category didn’t get set first time, and the post seems to have gone unnoticed).
I can’t import byteArray using the new ES module style of import. I’m using gjs 1.68.1. ‘gi://’ imports and relative imports work, but not byteArray. The docs give this example of importing a built-in module:
import system from 'system';
(although it says elsewhere that a
.js extension is mandatory, but maybe that only applies to relative imports?).
So I tried:
import byteArray from 'byteArray';
which resulted in:
JS ERROR: ImportError: Unknown module: 'byteArray'
I’ve tried adding the extension, changing it to all lower case, capitalizing the B, adding a leading slash etc, but I haven’t found anything that works apart from resorting to the legacy
imports global object.
Is byteArray not supported by ES module import (yet)?