Help with translation
Im following the guide for translating in the wiki, but failing on the initial building step (running make is sbt):
sbt:sharry-root> make
[info] Defining webapp / elmCompileMode
[info] The new value will be used by webapp / Compile / resourceGenerators
[info] Reapplying settings...
[info] set current project to sharry-root (in build file:/home/artiekra/Personal/sharry/)
[info] Defining webapp / stylesMode
[info] The new value will be used by webapp / stylesBuild
[info] Reapplying settings...
[info] set current project to sharry-root (in build file:/home/artiekra/Personal/sharry/)
[success] Total time: 0 s, completed May 30, 2025, 9:23:09 PM
[info] Compile elm files ...
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/android-chrome-192x192.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/android-chrome-192x192.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/android-chrome-512x512.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/android-chrome-512x512.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/apple-touch-icon.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/apple-touch-icon.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/browserconfig.xml -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/browserconfig.xml
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/favicon-16x16.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/favicon-16x16.png
[info] Running npm install …
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/favicon-32x32.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/favicon-32x32.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/favicon.ico -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/favicon.ico
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/manifest.json -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/manifest.json
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/mstile-150x150.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/mstile-150x150.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/favicon/safari-pinned-tab.svg -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/favicon/safari-pinned-tab.svg
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/img/icon-dark.svg -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/img/icon-dark.svg
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/img/icon.svg -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/img/icon.svg
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/img/logo-dark.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/img/logo-dark.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/img/logo-dark.svg -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/img/logo-dark.svg
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/img/logo.png -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/img/logo.png
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/img/logo.svg -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/img/logo.svg
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/sharry.css -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/sharry.css
[info] Copy /home/artiekra/Personal/sharry/modules/webapp/src/main/webjar/sharry.js -> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/sharry.js
[info] compiling 21 Scala sources to /home/artiekra/Personal/sharry/modules/common/target/scala-3.6.3/classes ...
[info] Copy /home/artiekra/Personal/sharry/modules/restapi/src/main/resources/sharry-openapi.yml -> /home/artiekra/Personal/sharry/modules/restserver/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-restserver/1.16.0-SNAPSHOT/sharry-openapi.yml
[info] Compiling ...
[info]
[info] Success!
[info]
[info] Main ───> /home/artiekra/Personal/sharry/modules/webapp/target/scala-3.6.3/resource_managed/main/META-INF/resources/webjars/sharry-webapp/1.16.0-SNAPSHOT/sharry-app.js
[info]
[warn] -- Deprecation Warning: /home/artiekra/Personal/sharry/modules/common/src/main/scala/sharry/common/LenientUri.scala:59:29
[warn] 59 | Either.catchNonFatal(new URL(asString)).left.map(_.getMessage)
[warn] | ^^^
[warn] |constructor URL in class URL is deprecated: see corresponding Javadoc for more information.
[warn] -- Deprecation Warning: /home/artiekra/Personal/sharry/modules/common/src/main/scala/sharry/common/LenientUri.scala:71:37
[warn] 71 | .emit(Either.catchNonFatal(new URL(asString)))
[warn] | ^^^
[warn] |constructor URL in class URL is deprecated: see corresponding Javadoc for more information.
[error] No warnings can be incurred under -Werror (or -Xfatal-warnings)
[warn] two warnings found
[error] one error found
[error] stack trace is suppressed; run last webapp / stylesBuild for the full output
[error] (common / Compile / compileIncremental) Compilation failed
[error] (webapp / stylesBuild) java.io.IOException: Cannot run program "npm" (in directory "/home/artiekra/Personal/sharry/modules/webapp"): error=2, No such file or directory
[error] Total time: 12 s, completed May 30, 2025, 9:23:21 PM
I am not familiar with neither elm or sbt, but I think i have followed the guide correctly, could I get any help, or is there any other preferred way to submit questions like these?
And it doesnt seem like i can ignore those issues, there is nothing starting at http://localhost:9090/
Hi @artiekra I'm sorry for the late reply, this issue went under the radar :-| This is a good way for questions.
I think you are using a JVM not compatible, a too new one. Can you try Java 17?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you!
Ive switched to 17, now getting the following issue:
[error] (webapp / stylesBuild) java.io.IOException: Cannot run program "tailwindcss" (in directory "/home/artiekra/Personal/other/sharry/modules/webapp"): error=2, No such file or directory
(https://bin.artiekra.org/p/54OZgT.log)
You might want to read https://eikek.github.io/sharry/doc/dev you need some tools available, for example tailwindcss
Okay, thanks - in this case page at https://github.com/eikek/sharry/wiki/Translation should be updated (Contributing.md points to it) - if I understood correctly those are not the right instructions to build anymore
Sorry for all these issues - I am not familiar with any of the tools used for building (Ive never used Nix either), I am trying to follow your documentation as closely as possible
Im currently following dev docs instead of translation docs. Installed tailwind, and running sbt and make as before:
[error] ≈ tailwindcss v4.1.12
[error]
[error] Error: Cannot apply unknown utility class `px-2`. Are you using CSS modules or similar and missing `@reference`? https://tailwindcss.com/docs/functions-and-directives#reference-directive
(full at https://bin.artiekra.org/p/JVuydB.log)
Am I using the wrong version again?
Okay, thanks - in this case page at https://github.com/eikek/sharry/wiki/Translation should be updated (
Contributing.mdpoints to it) - if I understood correctly those are not the right instructions to build anymore
Yes, you are probably right, sorry for that! The build changed a little in the past.
Im currently following dev docs instead of translation docs. Installed tailwind, and running
sbtandmakeas before:[error] ≈ tailwindcss v4.1.12 [error] [error] Error: Cannot apply unknown utility class `px-2`. Are you using CSS modules or similar and missing `@reference`? https://tailwindcss.com/docs/functions-and-directives#reference-directive(full at https://bin.artiekra.org/p/JVuydB.log)
Am I using the wrong version again?
Oh, I've never seen that message before. Sharry is still on tailwindcss 3, I think 4 won't work. If you can install nix, you could get into a shell with all the tools available.
Thank you again! It worked after i did both nix develop and nix run, I hope thats the right way to do it.. Had to poke around the commands randomly, since I never used Nix - running just nix develop didn't give any indication of it working, and tools were still on the wrong version.. Would be cool if docs gave more elaborate Nix instructions, because it seems like very hard to get it running otherwise
I will close this and create a separate issue if anything else goes wrong (I hope not), and get to translating when I find a little more free time ;3