Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError in blur-me@nunchucks Extension #69

Open
gamertoky1188gro opened this issue Nov 7, 2024 · 0 comments
Open

SyntaxError in blur-me@nunchucks Extension #69

gamertoky1188gro opened this issue Nov 7, 2024 · 0 comments

Comments

@gamertoky1188gro
Copy link

The blur-me@nunchucks extension throws the following error when attempting to load its settings:

SyntaxError: import declarations may only appear at top level of a module @ resource:///org/gnome/Shell/Extensions/js/misc/extensionUtils.js:4:1

Stack trace:
  @file:///home/gamertoky1188/.local/share/gnome-shell/extensions/blur-me@nunchucks/prefs.js:5:24
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

The error seems to be caused by the use of import statements not placed at the top level of the module, which is not supported in GNOME Shell's JavaScript environment.

System Information:

  • GNOME Shell version: 47.1
  • Operating System: Kali GNU/Linux Rolling 2024.3
  • Kernel Version: 6.11.2-amd64
  • Architecture: x86-64
  • Hardware Model: Lenovo G400s
  • Firmware Version: 7BCN21WW(V1.05)

Steps to Reproduce:

  1. Install the blur-me@nunchucks extension from GNOME Extensions.
  2. Attempt to open the settings for the extension.
  3. Observe the error that appears in the console.

Expected Behavior:

The extension should load its settings without errors.

Actual Behavior:

The extension throws a SyntaxError due to improperly placed import statements.

Suggested Fix:

  • Ensure all import declarations are placed at the top level of the file, outside of any functions or conditional blocks.
  • Alternatively, consider replacing import with require if needed for compatibility with GNOME Shell's JavaScript engine.

Thank you for your work on this extension!
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant