Closed kerim closed 1 year ago
Hi @kerim. When you run this command find .nbb/.cache/X/nbb-deps/logseq
where X is a random id like b34aecd91133fb66d9a99efeb9e3073b9e151750
, what do you see? I see:
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/extract.cljc
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/config.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/whiteboard.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/log.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/cli.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/test
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/test/docs_graph_helper.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/util
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/util/block_ref.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/util/db.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/util/page_ref.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/block.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/schema
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/schema/mldoc.cljc
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/util.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/property.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/text.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/mldoc.cljc
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/utf8.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/graph_parser/date_time_util.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/db.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/db
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/db/rules.cljc
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/db/default.cljs
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq/db/schema.cljs
Having the file ending in graph_parser/cli.cljs
is necessary in order for the CLI to work and why you're getting an error. Could you share the output of that command and specify what version (git SHA) of the graph-validator you have cloned?
find: .nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/nbb-deps/logseq: No such file or directory
I ran the clone command after the last update. I don't remember the version number. Since it isn't loaded via brew I'm not sure how to check the version?
In the announcement you said it was Release 0.4.0.
Hmm. What does find .nbb/.cache/*/nbb-deps/logseq
give you?
I ran the clone command after the last update. I don't remember the version number. Since it isn't loaded via brew I'm not sure how to check the version?
Nice. It's a recent version so no need
"no matches found: .nbb/.cache/*/nbb-deps/logseq"
Sorry but I forgot to document you also need to have clojure installed. With that installed, could you give rm -rf .nbb/ && node graph_validator.mjs
another try? If that doesn't work, could you give me the output of find .nbb
and bb --config nbb.edn print-deps --format classpath
?
OK, installed, but still getting errors:
Downloading dependencies...
Extracting dependencies...
Done.
file:///Users/{user folder}/graph-validator/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:2238
Zr,new $APP.E(null,new $APP.E(null,$APP.xl,new $APP.E(null,z,null,1,null),2,null),new $APP.E(null,Xr,new $APP.E(null,new $APP.E(null,$APP.xl,new $APP.E(null,F,null,1,null),2,null),null,1,null),2,null),3,null),4,null),5,null),6,null)):null}finally{$APP.gq()}}).then(function(){var S=$APP.y(a);return Ju.g?Ju.g(S,b):Ju.call(null,S,b)}):Promise.reject(Error(["Could not find namespace: ",$APP.p.h(r)].join("")))}return Promise.resolve($APP.U.h(b))};
^
Error: Could not find namespace: logseq.graph-parser.cli
at Ju (file:///Users/{user folder}/graph-validator/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:2238:350)
at file:///Users/{user folder}/graph-validator/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:647:207
at async file:///Users/{user folder}/graph-validator/graph_validator.mjs:9:18
Node.js v19.9.0
It finds nbb now:
find .nbb
.nbb
.nbb/.cache
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750
.nbb/.cache/b34aecd91133fb66d9a99efeb9e3073b9e151750/deps.edn
But this is still not working:
bb --config nbb.edn print-deps --format classpath
✖ [2023-04-18 07:19:51:535] Error running command. Please check the stacktrace or the help section "bb -h".
✖ [2023-04-18 07:19:51:539] TypeError: command is not a constructor
at Program.invoke (/opt/homebrew/lib/node_modules/bb-cli/node_modules/ronin/build/program.js:364:5)
at Program.run (/opt/homebrew/lib/node_modules/bb-cli/node_modules/ronin/build/program.js:196:12)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/bb-cli/bin/bb:29:13)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
✖ [2023-04-18 07:19:51:539] TypeError: command is not a constructor at Program.invoke (/opt/homebrew/lib/node_modules/bb-cli/node_modules/ronin/build/program.js:364:5) at Program.run (/opt/homebrew/lib/node_modules/bb-cli/node_modules/ronin/build/program.js:196:12)
Ah. That's the culprit. bb-cli
is an npm lib you installed before installing babashka. You'll need to uninstall that program and make sure that the above bb command works. You may want to start a new shell after uninstalling the program so that babashka's bb
is recognized
Doesn't seem to help. Still getting errors.
rm -rf .nbb/ && node graph_validator.mjs
Downloading dependencies...
Extracting dependencies...
Done.
file:///Users/{home}/graph-validator/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:2238
Zr,new $APP.E(null,new $APP.E(null,$APP.xl,new $APP.E(null,z,null,1,null),2,null),new $APP.E(null,Xr,new $APP.E(null,new $APP.E(null,$APP.xl,new $APP.E(null,F,null,1,null),2,null),null,1,null),2,null),3,null),4,null),5,null),6,null)):null}finally{$APP.gq()}}).then(function(){var S=$APP.y(a);return Ju.g?Ju.g(S,b):Ju.call(null,S,b)}):Promise.reject(Error(["Could not find namespace: ",$APP.p.h(r)].join("")))}return Promise.resolve($APP.U.h(b))};
^
Error: Could not find namespace: logseq.graph-parser.cli
at Ju (file:///Users/{home}/graph-validator/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:2238:350)
at file:///Users/{home}/graph-validator/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:647:207
at async file:///Users/{home}/graph-validator/graph_validator.mjs:9:18
Node.js v19.9.0
bb --config nbb.edn print-deps --format classpath
✖ [2023-04-19 08:51:24:421] Error running command. Please check the stacktrace or the help section "bb -h".
✖ [2023-04-19 08:51:24:425] TypeError: command is not a constructor
at Program.invoke (/opt/homebrew/lib/node_modules/bb-cli/node_modules/ronin/build/program.js:364:5)
at Program.run (/opt/homebrew/lib/node_modules/bb-cli/node_modules/ronin/build/program.js:196:12)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/bb-cli/bin/bb:29:13)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
Since you're still seeing node_modules/bb-cli
in that stacktrace, you
haven't uninstalled bb-cli. I don't know how you installed it but I'm
guessing with npm or brew. You'll need to uninstall it, start a new shell
and then try bb --config ...
to confirm you have the right bb
provided
by babashka
On Tue, 18 Apr 2023 at 20:50, P. Kerim Friedman @.***> wrote:
Doesn't seem to help. Still getting errors.
rm -rf .nbb/ && node graph_validator.mjs Downloading dependencies... Extracting dependencies... Done. @.***/nbb-logseq/lib/nbb_core.js:2238 Zr,new $APP.E(null,new $APP.E(null,$APP.xl,new $APP.E(null,z,null,1,null),2,null),new $APP.E(null,Xr,new $APP.E(null,new $APP.E(null,$APP.xl,new $APP.E(null,F,null,1,null),2,null),null,1,null),2,null),3,null),4,null),5,null),6,null)):null}finally{$APP.gq()}}).then(function(){var S=$APP.y(a);return Ju.g?Ju.g(S,b):Ju.call(null,S,b)}):Promise.reject(Error(["Could not find namespace: ",$APP.p.h(r)].join("")))}return Promise.resolve($APP.U.h(b))}; ^
Error: Could not find namespace: logseq.graph-parser.cli at Ju @./nbb-logseq/lib/nbb_core.js:2238:350) at @./nbb-logseq/lib/nbb_core.js:647:207 at async file:///Users/{home}/graph-validator/graph_validator.mjs:9:18
Node.js v19.9.0
— Reply to this email directly, view it on GitHub https://github.com/logseq/graph-validator/issues/2#issuecomment-1513964666, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXFVC52CCLY3FE3HA4W3SBLXB4ZGVANCNFSM6AAAAAAW25RKRI . You are receiving this because you commented.Message ID: @.***>
I'm obviously not unstalling it right, but I'm not sure what to do? I ran npm remove bb-cli
and didn't get any error message, so I assumed it worked?
I followed the instructions on this page to install it, but they don't have uninstall instructions: https://www.npmjs.com/package/bb-cli
I tried npm uninstall as well, but still getting the same error...
Figured it out! Seems I had used the -global flag in those instructions, so to remove it I needed to use:
npm uninstall -g bb-cli --save
I then needed to uninstall and re-install Babashka with brew. Now things are working. Thanks for your patience!
No worries. Glad you are able to run it!
On Tue, 18 Apr 2023 at 21:28, P. Kerim Friedman @.***> wrote:
Closed #2 https://github.com/logseq/graph-validator/issues/2 as completed.
— Reply to this email directly, view it on GitHub https://github.com/logseq/graph-validator/issues/2#event-9041424515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXFVC54BWU7KL2VRUZO4R7LXB45VXANCNFSM6AAAAAAW25RKRI . You are receiving this because you commented.Message ID: @.***>
I'm having error messages I don't understand when I try to run the app using "logseq-graph-validator" from within the graph folder, or running "rm -rf .nbb/ && node graph_validator.mjs" from within the app folder. (I was suggested to do the latter by @cldwalker.) Here is what I am seeing. Info about my setup below.
M1 MacBook Pro (always updated to latest version of MacOS) borkdude/brew/babashka: stable 1.3.176 yarn: stable 1.22.19 (bottled) node: stable 19.8.1 (bottled), HEAD