Page 1 of 1
Documentation on module creation seems to be outdated
Posted: Fri Jun 20, 2025 8:51 am
by oliveros
Hi all
jamovi is what I always wanted to make R packages easier to use for users who can't program.
I tried to follow the documentation to create a test module but it was impossible to get it. jmvtools does not generate the files it is supposed to generate (0000.yaml does not appear) and when I tried to compose the files by hand, the jmvtools::install() command does nothing (neither gives error nor results).
I think the documentation on module development is out of date with the latest version and I am concerned that if I recommend jamovi to my users, I will have recurring problems with updates.
Are you planning to update the documentation and the jmvtools package so that modules can be created and installed in the latest version (2.6)?
Thanks!
Oliveros
Re: Documentation on module creation seems to be outdated
Posted: Fri Jun 20, 2025 9:08 am
by jonathon
hi oliveros,
there are maybe one or two (fairly inconsequential) things that need a little update in the developer docs, but i think you'll find that it is mostly still correct.
could you provide the output from `jmvtools::install()`?
cheers
jonathon
Re: Documentation on module creation seems to be outdated
Posted: Fri Jun 20, 2025 2:14 pm
by oliveros
Hi,
Thanks for such a quick answer!
Unfortunately jmvtools::install() does not produce any output. No messages and no new files. I could not construct a proper module to be installed.
These are the folders and files generated by
jmvtools:create("MyModule")
setwd("MyModule")
jmvtools::addAnalysis(name="ttest", title="Independent Samples T-Test")
(By the way, after each jmvtools command I had to write ".exit" to exit from a unexpected "console" of Node.js)
Obtained Files:
-------------------
MyModule/jamovi/ttest.a.yaml
MyModule/jamovi/ttest.r.yaml
MyModule/R (empty folder)
MyModule/.gitignore
MyModule/DESCRIPTION
MyModule/NAMESPACE
Missing files (as described in dev.jamovi.org):
-------------------------------------------------------
MyModule/jamovi/ttest.u.yaml
MyModule/jamovi/0000.yaml
MyModule/R/ttest.h.R
MyMOdule/R/ttest.b.R
Also, I had a hard time trying to solve the error "dependency 'node' not found" (more or less) when trying to install jmvtools. Finally after several online searches, I found and installed the R package node_1.1.tar.gz.
I can programming in R and I can understand the way jamovi construct the UI and send the variables to the code, but with no accurate information on the jamovi's file structure I could not run even a simple test module.
In any case, congratulations for such an useful application!
All the best,
Juan Carlos
Re: Documentation on module creation seems to be outdated
Posted: Sat Jun 21, 2025 12:37 am
by jonathon
hi,
it sounds like the issue is that node was missing. i would try the command again:
install.packages('jmvtools', repos='
https://repo.jamovi.org')
if node was missing, i could imagine nothing working.
jonathon
Re: Documentation on module creation seems to be outdated
Posted: Sat Jun 21, 2025 7:08 am
by oliveros
Hi,
Actually Node was missing when I tried installing jmvtools the first time. Then I installed Node.js (double-checked with system commands "node -v" and "npm -v") and, finally, I installed node_1.1.tar.gz from jamovi repository (as indicated in another forum).
So, node (R package) and Node.js were installed but jmvtools::create(), jmvtools::addAnalysis() do not work as described in the developer's documentation. They generate only half of the mentioned files and with jmvtools::install() nothing happen.
I am working on Windows 11.
Thanks!
JC
Re: Documentation on module creation seems to be outdated
Posted: Sat Jun 21, 2025 8:32 am
by jonathon
i think node 1.1 is outdated rather than the documentation.
update your node to 1.2 (R package), and come back to us if you're still having trouble.
jonathon
Re: Documentation on module creation seems to be outdated
Posted: Mon Jun 23, 2025 7:03 am
by oliveros
Hi,
I installed node.1.2 from
https://repo.jamovi.org/src/contrib/node_1.2.tar.gz
Unfortunately, the issues persist. I am unable to create modules. Documentations is about jamovi 2.5 that depends on R 4.3 but available jamovi release is 2.6 that depends on R 4.4.
Also, node requirements are not mentioned in the manual (I found the node path to node 1.0 and node 1.1 from
viewtopic.php?t=2112&start=10)
Finally, when I use jmvtools commands in R I get this:
> jmvtools::install()
Welcome to Node.js v16.14.2.
Type ".help" for more information.
(I need to write ".exit" every time to exit this "Node console?")
Thank you for your support.
Regards,
JC
Re: Documentation on module creation seems to be outdated
Posted: Mon Jun 23, 2025 8:24 am
by jonathon
> Documentations is about jamovi 2.5 that depends on R 4.3 but available jamovi release is 2.6 that depends on R 4.4
we mentioned the release of the 2.5 in the news, but the documentation is no less relevant for subsequent versions.
> Also, node requirements are not mentioned in the manual
i'm not actually sure how you managed to install jmvtools without node being pulled in automatically. R doesn't normally do that, so it's not normally a problem.
> (I need to write ".exit" every time to exit this "Node console?")
yeah, this is very unusual, and amongst all the people who develop modules for jamovi, this is the first i've heard of it.
a workaround might be to clone the jamovi-compiler repo:
https://github.com/jamovi/jamovi-compiler
and then issue the command:
path/to/your/system's/node path/to/jamovi-compiler/index.js --install path/to/module
i appreciate that these speed bumps can be annoying!
cheers
jonathon
Re: Documentation on module creation seems to be outdated
Posted: Wed Jun 25, 2025 11:08 am
by oliveros
Hi,
Finally I managed to create and install a jamovi module. Previously I uninstalled Node.js and every single R version that I had installed in my computer. Also uninstalled and reinstalled jamovi app.
Some configuration of my own PC was causing troubles...
I could install jmvtools (and node dependency, automatically) and all R commands are working properly.
I am glad to know that there is not a problem with outdated versions or module file formats.
Please accept my apologies for the inconveniences and the noise.
Many thanks for your support!
jamovi is a terrific app!!
All the best,
JC