This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-09
Channels
- # babashka (176)
- # beginners (26)
- # cider (1)
- # cljsrn (3)
- # clojure (60)
- # clojure-australia (3)
- # clojure-europe (8)
- # clojure-uk (3)
- # clojurescript (1)
- # code-reviews (4)
- # community-development (3)
- # cursive (6)
- # depstar (1)
- # emacs (11)
- # figwheel (3)
- # helix (13)
- # integrant (2)
- # jackdaw (1)
- # kaocha (1)
- # leiningen (3)
- # luminus (2)
- # malli (4)
- # music (1)
- # nrepl (2)
- # off-topic (1)
- # practicalli (3)
- # reitit (3)
- # shadow-cljs (16)
- # slack-help (14)
- # sql (13)
- # vim (12)
hello, how can i use this remote in render file with electron
import {remote} from "electron";
when i import it ,it outputs
An error occurred when loading app.renderer.core.js
env.evalLoad @ renderer.js:1562
(anonymous) @ renderer.js:2005
renderer.js:1563 TypeError: exports.existsSync is not a function
at Object.shadow$provide.module$node_modules$electron$index (index.js:9)
at Object.shadow.js.jsRequire (js.js:66)
at Object.shadow.js.require (js.js:113)
at eval (js/cljs-runtime/app.renderer.core.js:3)
at eval (<anonymous>)
at Object.goog.globalEval (renderer.js:497)
at Object.env.evalLoad (renderer.js:1560)
at renderer.js:2005
env.evalLoad @ renderer.js:1563
(anonymous) @ renderer.js:2005
js/cljs-runtime/shadow.module.renderer.append.js:4 An error occurred when calling (app.renderer.core/start!)
eval @ js/cljs-runtime/shadow.module.renderer.append.js:4
goog.globalEval @ renderer.js:497
env.evalLoad @ renderer.js:1560
(anonymous) @ renderer.js:2006
renderer.js:1562 An error occurred when loading shadow.module.renderer.append.js
env.evalLoad @ renderer.js:1562
(anonymous) @ renderer.js:2006
renderer.js:1563 TypeError: app.renderer.core.start_BANG_ is not a function
at eval (js/cljs-runtime/shadow.module.renderer.append.js:4)
at eval (<anonymous>)
at Object.goog.globalEval (renderer.js:497)
at Object.env.evalLoad (renderer.js:1560)
at renderer.js:2006
not enough code to comment. you are calling existsSync
on something but I can't guess the code doing that.
const fs = require('fs');
const path = require('path');
const pathFile = path.join(__dirname, 'path.txt');
function getElectronPath () {
if (fs.existsSync(pathFile)) {
const executablePath = fs.readFileSync(pathFile, 'utf-8');
if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {
return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath);
}
return path.join(__dirname, 'dist', executablePath);
} else {
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');
}
}
module.exports = getElectronPath();
i found it in node_modules/electron/index.jsHi guys, I'm getting this error
The required JS dependency "entities/maps/entities.json" is not available, it was required by "node_modules/htmlparser2/lib/Tokenizer.js".
Dependency Trace:
tung_frontend/devcards/core.cljs
tung_frontend/devcards/text_chat.cljs
node_modules/stream-chat-react/dist/index.js
node_modules/react-markdown/with-html.js
node_modules/react-markdown/lib/with-html.js
node_modules/react-markdown/lib/plugins/html-parser.js
node_modules/html-to-react/index.js
node_modules/html-to-react/lib/parser.js
node_modules/htmlparser2/lib/index.js
node_modules/htmlparser2/lib/Parser.js
node_modules/htmlparser2/lib/Tokenizer.js
Searched for npm packages in:
/home/anonimito/work/pegleg/clojure/eviota-frontend/node_modules
See:
I found this old shadow-cljs thread that contains this exact error message
https://clojurians-log.clojureverse.org/shadow-cljs/2020-08-20/1598004360.046400 but it doesn't seem to work for me.
Relevant config:
:devcards {:asset-path "js/devcards"
:modules {:main {:init-fn tung-frontend.devcards.core/main}}
:compiler-options {:devcards true}
:output-dir "resources/public/js/devcards"
;; :devtools {:httop-root "resources/public" :http-port 8281}
:target :browser
:build-options {:ns-aliases {devcards-marked
tung-frontend.devcards.cljsjs.marked
devcards-syntax-highlighter
tung-frontend.devcards.cljsjs.highlight}}
;; See
:js-options {:resolve {"entities/maps/entities.json"
{:target :npm
:require "entities/lib/maps/entities.json"}}}}
I'm using thheller/shadow-cljs "2.11.4"
Weird, installing htmlparser2
manually seems to solve it. π
Right, I see 2 versions of it (via yarn why
)
=> Found "[email protected]"
info Has been hoisted to "htmlparser2"
info Reasons this module exists
- Hoisted from "stylelint#postcss-html#htmlparser2"
- Hoisted from "stream-chat-react#react-images#html-react-parser#html-dom-parser#htmlparser2"
info Disk size without dependencies: "420KB"
info Disk size with unique dependencies: "1.09MB"
info Disk size with transitive dependencies: "1.29MB"
info Number of shared dependencies: 12
=> Found "html-to-react#[email protected]"
info This module exists because "stream-chat-react#react-markdown#html-to-react" depends on it.
info Disk size without dependencies: "164KB"
info Disk size with unique dependencies: "584KB"
info Disk size with transitive dependencies: "608KB"
info Number of shared dependencies: 5
anyone had any issues with watching changes in Linux on Windows environment?
I have a client, who has launched shadow-cljs watch app
, then he changes a view file, but shadow doesnβt recompile.
Perhaps may be some WSL issue.
If shadow-cljs build is re-launched β then it updates the view.
----
UPD: My client found this https://stackoverflow.com/questions/66055215/emacs-cider-with-shadow-cljs-browser-settings-on-windows-wsl2-hot-code-reload/66061927#66061927, so suspicion moves strongly towards WSL conf.
----
UPD2: Fixed with SO instructions
I've done all my wsl2 development from within the linux FS and had no problems with any watchers.