Skip to content

Add electron support #89

Description

@saikyun

Hello! I'm playing around with shadow-cljs + electron (which seems to work really nice!). dirac seems like it would benefit me greatly, so I tried adding it using electrons BrowserWindow.addDevToolsExtension(path) (api docs here).
Sadly I get this error, and I'm unable to figure out what's going wrong:

Uncaught Exception:
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:105:11)
    at Object.join (path.js:1037:7)
    at startBackgroundPages (/Users/<omitted>/examples/electron/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:80:33)
    at loadExtension (/Users/<omitted>/examples/electron/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:288:3)
    at Function.BrowserWindow.addExtension (/Users/<omitted>/examples/electron/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:378:7)
    at Function.BrowserWindow.addDevToolsExtension (/Users/<omitted>/examples/electron/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:408:40)
    at Object.example$main$create_window [as create_window] (/Users/<omitted>/examples/electron/.shadow-cljs/builds/main/dev/out/cljs-runtime/example.main.js:30:46)
    at App.example$main$maybe_create_window (/Users/<omitted>/examples/electron/.shadow-cljs/builds/main/dev/out/cljs-runtime/example/main.cljs:51:3)
    at App.emit (events.js:194:13)

I've successfully used the react dev tools extension, so I don't think I'm doing anything wrong on my end.

Any help or suggestions is very appreciated. :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions