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

Can't get to "Introduction" from index.clj #14

Open
khinsen opened this issue May 21, 2023 · 3 comments
Open

Can't get to "Introduction" from index.clj #14

khinsen opened this issue May 21, 2023 · 3 comments

Comments

@khinsen
Copy link

khinsen commented May 21, 2023

Following your instructions, I end up typing "bb clerk-watch", which (after five minutes, tons of downloads, and a couple of medium-scary warnings and error messages) opens a browser tab showing the rendered version of index.clj. So far - great!

But when I click on "Introduction", the URL changes to localhost:7777/essays/reality/introduction, but the contents are again those of index.clj. I can repeat this game and add ever more instances of essays/reality/ in the URL, but I never get the rendered introduction. But there are no more error message in the shell, once the browser tab is opened.

For completeness, here is the full output of bb clerk-watch:

$ bb clerk-watch
Cloning: https://github.com/mentat-collective/emmy-viewers.git
Warning: failed to load the S3TransporterFactory class
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Checking out: https://github.com/mentat-collective/emmy-viewers.git at 0ae1d00133cc49fcd6a32363abaf3cf0c7a71f06
Warning: failed to load the S3TransporterFactory class
Warning: failed to load the S3TransporterFactory class
Warning: failed to load the S3TransporterFactory class
Warning: failed to load the S3TransporterFactory class
Warning: failed to load the S3TransporterFactory class
Warning: failed to load the S3TransporterFactory class
Warning: failed to load the S3TransporterFactory class
Downloading: org/mentat/emmy/0.31.0-SNAPSHOT/maven-metadata.xml from clojars
Downloading: org/mentat/mafs.cljs/0.2.1/mafs.cljs-0.2.1.pom from clojars
Downloading: org/mentat/leva.cljs/0.2.2/leva.cljs-0.2.2.pom from clojars
Downloading: org/mentat/jsxgraph.cljs/0.2.0/jsxgraph.cljs-0.2.0.pom from clojars
Downloading: org/mentat/mathlive.cljs/0.2.0/mathlive.cljs-0.2.0.pom from clojars
Downloading: org/mentat/mathbox.cljs/0.2.0/mathbox.cljs-0.2.0.pom from clojars
Downloading: org/mentat/emmy/0.31.0-SNAPSHOT/emmy-0.31.0-20230426.101647-1.pom from clojars
Downloading: cider/cider-nrepl/0.28.3/cider-nrepl-0.28.3.pom from clojars
Downloading: org/mentat/mathlive.cljs/0.2.0/mathlive.cljs-0.2.0.jar from clojars
Downloading: org/mentat/jsxgraph.cljs/0.2.0/jsxgraph.cljs-0.2.0.jar from clojars
Downloading: org/mentat/mafs.cljs/0.2.1/mafs.cljs-0.2.1.jar from clojars
Downloading: org/mentat/emmy/0.31.0-SNAPSHOT/emmy-0.31.0-20230426.101647-1.jar from clojars
Downloading: org/mentat/leva.cljs/0.2.2/leva.cljs-0.2.2.jar from clojars
Downloading: org/mentat/mathbox.cljs/0.2.0/mathbox.cljs-0.2.0.jar from clojars
Downloading: cider/cider-nrepl/0.28.3/cider-nrepl-0.28.3.jar from clojars
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.math.numeric-tower, being replaced by: #'clojure.math.numeric-tower/abs
Running npm install...
added 289 packages from 205 contributors and audited 301 packages in 55.164s

19 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities


running: npm install --save --save-exact
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react-dom@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react-dom@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react-dom@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN @radix-ui/[email protected] requires a peer of react@^16.8 || ^17.0 but none is installed. You must install peer dependencies yourself.
npm WARN road-to-reality No repository field.
npm WARN road-to-reality No license field.

audited 301 packages in 1.46s

19 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

May 21, 2023 9:09:23 PM io.undertow.Undertow start
INFO: starting server: Undertow - 2.2.4.Final
May 21, 2023 9:09:23 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.8.0.Final
May 21, 2023 9:09:23 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.8.0.Final
May 21, 2023 9:09:23 PM org.jboss.threads.Version <clinit>
INFO: JBoss Threads version 3.1.0.Final
May 21, 2023 9:09:29 PM io.undertow.Undertow start
INFO: starting server: Undertow - 2.2.4.Final
shadow-cljs - HTTP server available at http://localhost:8765
shadow-cljs - server version: 2.22.7 running at http://localhost:9630
shadow-cljs - nREPL server started on port 46457
[:mentat.clerk-utils.build.shadow/clerk] Configuring build.
[:mentat.clerk-utils.build.shadow/clerk] Compiling ...
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
------ WARNING #1 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/render/meshes/base.js:98:26
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #2 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/render/meshes/base.js:100:26
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #3 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/render/meshes/base.js:108:28
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #4 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/render/meshes/base.js:110:26
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #5 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/splash.js:41:18
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #6 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/splash.js:42:50
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #7 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:68:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #8 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:72:43
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #9 -  -----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:86:13
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #10 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:87:34
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #11 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:91:13
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #12 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:96:19
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #13 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:105:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #14 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:109:9
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #15 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:121:12
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #16 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:123:25
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #17 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:127:12
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #18 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:129:16
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #19 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:161:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #20 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:162:49
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #21 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:177:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #22 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:178:49
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #23 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:203:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #24 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:205:21
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #25 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:238:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #26 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:240:27
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #27 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:267:10
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #28 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:269:21
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #29 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:282:12
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #30 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:283:21
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #31 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:286:12
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #32 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:287:24
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #33 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:296:35
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #34 -  ----------------------------------------------------------
 Resource: node_modules/mathbox/build/esm/util/glsl.js:298:15
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #35 -  ----------------------------------------------------------
 Resource: node_modules/shadergraph/src/visualize/markup.js:131:23
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #36 -  ----------------------------------------------------------
 Resource: node_modules/shadergraph/src/visualize/markup.js:132:56
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #37 -  ----------------------------------------------------------
 Resource: node_modules/shadergraph/src/visualize/markup.js:140:23
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
------ WARNING #38 -  ----------------------------------------------------------
 Resource: node_modules/shadergraph/src/visualize/markup.js:143:56
 String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
[:mentat.clerk-utils.build.shadow/clerk] Build completed. (1319 files, 1317 compiled, 0 warnings, 60.90s)
Clerk evaluated 'essays/reality/index.clj' in 8319.680739ms.
Clerk webserver started on http://localhost:7777 ...
Starting new watcher for paths ["essays"]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
@sritchie
Copy link
Member

Hey @khinsen !

The problem here is that in the version of Clerk I am using, the links don't work in local mode. To navigate, you have to either:

  • Follow the REPL-based exploration steps to get a REPL up and run (nextjournal.clerk/show! <path>), like (nextjournal.clerk/show! "essays/reality/introduction.md"), or
  • edit any file and save it. This will trigger the file watcher to load it instead of the index.

I think this is fixed in a later version of Clerk and I plan on upgrading to remove this confusing experience!

Re: the scary output, I realized that I can make this better by pre-compiling a single JS bundle and setting the project to use that. That will save startup time and remove many dependencies like npm from the user's awareness.

I'm excited for your comments. I've got more ease-of-use changes coming down the pipeline for defining animations, so that that experience feels more like declaring the plots in this essay.

@khinsen
Copy link
Author

khinsen commented May 22, 2023

Thanks @sritchie, that works much better! I now get the right page, and it's mostly displayed correctly, with the exception of the first visualization:
Screenshot from 2023-05-22 11-13-50

I appreciate your efforts on ease of use. That's the weak spot of the Clojure ecosystem, where every part comes with a detailed manual that supposes you are already familiar with much of the rest of the ecosystem.

More abstractly, I find the tooling complexity a bit worrying from the scientist's perspective. All those messages in my terminal convey the overall message that there are tons of dependencies whose reliability and stability I cannot judge. Do I really want to rely on such a huge pile of unfamiliar code? Personally, I trust the Clojure community enough to keep this working, but I have been loosely in contact with it for many years.

@jakehoward
Copy link

jakehoward commented Jun 22, 2023

I've had the same issue and worked around it by typing http://localhost:7777/essays/reality/introduction.md into the address bar, which might help some folks for a one click fix.

@sritchie - I was wondering about the relative merits of providing a docker container for the runtime and mounting the code as a volume so you can keep your edits on your local disk. Might get closer to managing deps with more stability and providing a one command startup experience. I had some issues (which I managed to overcome) because I already had Babashka but it was out of date.

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

3 participants