Add electron support

Open
#89 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
electron

Research direction

Start with the examples/electron entry point and the call to BrowserWindow.addDevToolsExtension(path), then compare the Electron API documentation with the reported stack trace. Done means the Dirac extension can be loaded in the Electron example without the undefined path error.

Written by the indexing model from the issue text.

Description

help wanted

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. :)

Dominant language
Clojure
Stars
775
Forks
29
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from binaryage/dirac

All issues in binaryage/dirac

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.