[SOLVED] problems with jmvtools::install() and jmvtools::cre

Everything related to the development of modules in jamovi
pedrak
Posts: 16
Joined: Tue Apr 11, 2017 7:54 am

[SOLVED] problems with jmvtools::install() and jmvtools::cre

Post by pedrak »

Dear Friends,

I am having problems with jmvtools, both installing the test module and creating the 'SuperAwesome' module. I guess the problem is the same.

I am using a PC with windows 10
R 3.3.2
Rstudio 1.0.136
Jamovi -0.7.2.7

I followed the step by step instructions in the getting started page.
I put the path for jamovi in options(...), that appeared to be ok but later it does not find the compiler (?)

I am reporting below what happened

-----------------------------------------------------------------------------------------------
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.


> install.packages('jmvtools', repos=c('https://repo.jamovi.org', 'https://cran.r-project.org'))

Installing package into ‘C:/Users/679408/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
installing the source package ‘jmvtools’

trying URL 'https://repo.jamovi.org/src/contrib/jmv ... .17.tar.gz'
Content type 'application/x-tar' length 4052081 bytes (3.9 MB)
downloaded 3.9 MB

* installing *source* package 'jmvtools' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (jmvtools)

The downloaded source packages are in
‘C:\Users\679408\AppData\Local\Temp\RtmpGimbgR\downloaded_packages’

> getwd()
[1] "C:/Users/679408/Documents"

> jmvtools::check(home='C:\\Users\\679408\\Desktop\\jamovi-0.7.2.7\\bin')

jamovi compiler

jamovi found at C:\Users\679408\Desktop\jamovi-0.7.2.7\bin\jamovi.exe

> options(jamovi_home='C:\\Users\\679408\\Desktop\\jamovi-0.7.2.7\\bin')
> jmvtools::check()

jamovi compiler
jamovi found at C:\Users\679408\Desktop\jamovi-0.7.2.7\bin\jamovi.exe

> jmvtools::create('SuperAwesome')

jamovi compiler
jamovi could not be found!

Warning message:
running command '"C:/Users/679408/Documents/R/win-library/3.3/node/node.exe" "C:/Users/679408/Documents/R/win-library/3.3/jmvtools/node_modules/jamovi-compiler/index.js" --prepare "C:/Users/679408/Documents/SuperAwesome"' had status 1

> jmvtools::create('SuperAwesome')
Error: Directory already exists and is not empty

The directory was indeed there, but with wrong structure ...

SuperAwesome/
├── DESCRIPTION
├── NAMESPACE
├── jamovi/
└── R/

Any help would be appreciated

Best regards
Giuseppe
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by jonathon »

hi giuseppe,

in spite of the error messages, i think this is actually working. the SuperAwesome package appears to have been created successfully.

there's clearly a bug there we need to fix, but i think you'll be able to continue the tutorial successfully.

let me know if you still have troubles.

cheers
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by jonathon »

to explain the second error, you have:

> jmvtools::create('SuperAwesome')
Error: Directory already exists and is not empty

you've called create() a second time, and the error is because it has already been created. you should be able to call jmvtools::install('SuperAwesome') and it will install successfully.

also, i've just fixed the bug with create() throwing that error message, and have pushed out a new jmvtools (0.4.18). thanks for alerting us to the issue!

with thanks
pedrak
Posts: 16
Joined: Tue Apr 11, 2017 7:54 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by pedrak »

Hello Jonathon,

many thanks for your reply. After installing the new jmvtools (0.4.18) everything seems ok with the 'SuperAwesome' module, following the tutorial I was able to reproduce your results, very nice !
Unfortunately I still have problems installing the R Base module ...
Here is the report

> jmvtools::install()

jamovi compiler

wrote: anova.h.R
wrote: anova.src.js
wrote: anova.js
wrote: ttestis.h.R
wrote: ttestis.src.js
wrote: ttestis.js
wrote: ttestones.h.R
wrote: ttestones.src.js
wrote: ttestones.js
wrote: ttestps.h.R
wrote: ttestps.src.js
wrote: ttestps.js

Could not build module

Warning message:
running command '"C:/Users/679408/Documents/R/win-library/3.3/node/node.exe" "C:/Users/679408/Documents/R/win-library/3.3/jmvtools/node_modules/jamovi-compiler/index.js" --install "." --home "C:\Program Files\jamovi 0.7.2.7\bin"' had status 1

Many thanks for your time
Very best regards
Giuseppe
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by jonathon »

hmm, this one's a bit more puzzling.

it's easter over here, so we're having a long weekend, but i'll look into it when i'm back, maybe monday or tuesday.

with thanks
pedrak
Posts: 16
Joined: Tue Apr 11, 2017 7:54 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by pedrak »

It's Easter here too, have a wonderful weekend !
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by jonathon »

oh, sorry pedrak! i think i've fixed this, but forgot to let you know!

could you try out the latest jamovi 0.7.3 and the latest jmvtools?

with thanks
pedrak
Posts: 16
Joined: Tue Apr 11, 2017 7:54 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by pedrak »

Hi Jonathon,
sorry for the delay I have been away for some days.

I am sorry to give you extra work, unfortunately it still seems not working.
Here is the output from Rstudio

> options(jamovi_home='C:\\Program Files\\jamovi 0.7.3.0 Beta 3\\bin')
> jmvtools::check()

jamovi compiler
jamovi found at C:\Program Files\jamovi 0.7.3.0 Beta 3\bin\jamovi.exe


> jmvtools::install()

jamovi compiler

jamovi found at C:\Program Files\jamovi 0.7.3.0 Beta 3\bin\jamovi.exe

wrote: anova.h.R
upgraded: anova.u.yaml : from 1.0 => 2.0
wrote: anova.u.yaml
wrote: anova.src.js
wrote: anova.js
wrote: ttestis.h.R
upgraded: ttestis.u.yaml : from 1.0 => 2.0
wrote: ttestis.u.yaml
wrote: ttestis.src.js
wrote: ttestis.js
wrote: ttestones.h.R
upgraded: ttestones.u.yaml : from 1.0 => 2.0
wrote: ttestones.u.yaml
wrote: ttestones.src.js
wrote: ttestones.js
wrote: ttestps.h.R
upgraded: ttestps.u.yaml : from 1.0 => 2.0
wrote: ttestps.u.yaml
wrote: ttestps.src.js
wrote: ttestps.js

Error: EBUSY: resource busy or locked, read

Warning message:
running command '"C:/Users/GPedra/Documents/R/win-library/3.3/node/node.exe" "C:/Users/GPedra/Documents/R/win-library/3.3/jmvtools/node_modules/jamovi-compiler/index.js" --install "." --home "C:\Program Files\jamovi 0.7.3.0 Beta 3\bin"' had status 1

The greatest thank you for all the work you are doing
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by jonathon »

hmm. this is super puzzling :/

i've pushed out a new jmvtools which will output a bit more information. could you update and try that?

install.packages('jmvtools', repos='https://repo.jamovi.org')

with thanks
pedrak
Posts: 16
Joined: Tue Apr 11, 2017 7:54 am

Re: problems with jmvtools::install() and jmvtools::create()

Post by pedrak »

Hi Jonathon, here is the new output after upgrading jmvtools

> jmvtools::install()

jamovi compiler

jamovi found at C:\Program Files\jamovi 0.7.3.0 Beta 3\bin\jamovi.exe

wrote: anova.h.R
wrote: anova.src.js
wrote: anova.js
wrote: ttestis.h.R
wrote: ttestis.src.js
wrote: ttestis.js
wrote: ttestones.h.R
wrote: ttestones.src.js
wrote: ttestones.js
wrote: ttestps.h.R
wrote: ttestps.src.js
wrote: ttestps.js
writing module meta
wrote: 0000.yaml
wrote: jamovi.yaml

Error: EBUSY: resource busy or locked, read

Warning message:
running command '"C:/Users/679408/Documents/R/win-library/3.3/node/node.exe" "C:/Users/679408/Documents/R/win-library/3.3/jmvtools/node_modules/jamovi-compiler/index.js" --install "." --home "C:\Program Files\jamovi 0.7.3.0 Beta 3\bin"' had status 1

Best regards
Giuseppe
Post Reply