Mac system jmvtools check does not work
Mac system jmvtools check does not work
Hello, I have encountered a problem when trying to create a Jamovi module for Mac, the command
jmvtools:: check()
returns error:
jmvtools::check("~Applications/jamovi.app")
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
jmvtools::check(home = "~Applications/jamovi.app")
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
jmvtools::check(home = "/Applications/jamovi.app")
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
What is the issue that's causing this problem? How do solve it or is there another way around to create a module on Mac?
Thanks!
jmvtools:: check()
returns error:
jmvtools::check("~Applications/jamovi.app")
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
jmvtools::check(home = "~Applications/jamovi.app")
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
jmvtools::check(home = "/Applications/jamovi.app")
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
What is the issue that's causing this problem? How do solve it or is there another way around to create a module on Mac?
Thanks!
Re: Mac system jmvtools check does not work
hi,
i'm a little puzzled by this, because it's reporting that the sh command is not found ... sh is a tool available on all macOS systems, so i'm not sure why it wouldn't be finding it.
could you open a terminal, and run the command
/bin/sh
and see if it works.
kind regards
i'm a little puzzled by this, because it's reporting that the sh command is not found ... sh is a tool available on all macOS systems, so i'm not sure why it wouldn't be finding it.
could you open a terminal, and run the command
/bin/sh
and see if it works.
kind regards
-
- Posts: 14
- Joined: Thu Nov 12, 2020 1:49 am
Re: Mac system jmvtools check does not work
Getting the same thing.
Fresh install of OsX11 in a VMWare player, fresh install of R (4.1.3) and RStudio (2022.02.1 Build 461).
Can compile my module in R studio, and install of jmvtools is fine, but jmvtools:check(), jmvtools:install(), and jmvtools::create() give:
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
Opening a terminal and running /bin/sh starts sh.
Tried setting jamovi_home, but same thing. Soo close to getting this vmware install to build my module..
Fresh install of OsX11 in a VMWare player, fresh install of R (4.1.3) and RStudio (2022.02.1 Build 461).
Can compile my module in R studio, and install of jmvtools is fine, but jmvtools:check(), jmvtools:install(), and jmvtools::create() give:
sh: : command not found
Warning message:
In system2(exe, args, wait = TRUE) : error in running command
Opening a terminal and running /bin/sh starts sh.
Tried setting jamovi_home, but same thing. Soo close to getting this vmware install to build my module..
-
- Posts: 14
- Joined: Thu Nov 12, 2020 1:49 am
Re: Mac system jmvtools check does not work
I've downloaded jmvtools to do some snooping. It builds, but node returns "".
So the issue is not that sh is not found-- system2 is relaying a message that the argument passed to be executed is not found. I don't fully understand the included node package that wraps node.js, but it looks like, at least in the default configuration I've stumbled upon, it isn't passing anything into R?
So the issue is not that sh is not found-- system2 is relaying a message that the argument passed to be executed is not found. I don't fully understand the included node package that wraps node.js, but it looks like, at least in the default configuration I've stumbled upon, it isn't passing anything into R?
-
- Posts: 14
- Joined: Thu Nov 12, 2020 1:49 am
Re: Mac system jmvtools check does not work
The node package/wrapper that got installed with jmvtools does not seem to come with an osx version of node.js.
Re: Mac system jmvtools check does not work
ah, that's some good troubleshooting bob!So the issue is not that sh is not found-- system2 is relaying a message that the argument passed to be executed is not found.
what does running
node::node()
return?
if it returns something, what does:
file.exists(node::node())
return?
with thanks
-
- Posts: 14
- Joined: Thu Nov 12, 2020 1:49 am
Re: Mac system jmvtools check does not work
I get:
> node::node()
[1] ""
> file.exists(node::node())
[1] FALSE
> node::node()
[1] ""
> file.exists(node::node())
[1] FALSE
-
- Posts: 14
- Joined: Thu Nov 12, 2020 1:49 am
Re: Mac system jmvtools check does not work
I get:
> node::node()
[1] ""
> file.exists(node::node())
[1] FALSE
If I downgrade node with:
devtools::install_version('node', version = "1.0", repos=c('https://repo.jamovi.org', 'https://cran.r-project.org'))
Then I get:
> node::node()
[1] "/Library/Frameworks/R.framework/Versions/4.1/Resources/library/node/node-darwin/bin/node"
> file.exists(node::node())
[1] TRUE
But in that case, jmvtools::check gives an error... maybe expecting a different version of node.js complier?:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/jmvtools/node_modules/jamovi-compiler/index.js:52
(async function() {
^^^^^^^^
SyntaxError: Unexpected token function
> node::node()
[1] ""
> file.exists(node::node())
[1] FALSE
If I downgrade node with:
devtools::install_version('node', version = "1.0", repos=c('https://repo.jamovi.org', 'https://cran.r-project.org'))
Then I get:
> node::node()
[1] "/Library/Frameworks/R.framework/Versions/4.1/Resources/library/node/node-darwin/bin/node"
> file.exists(node::node())
[1] TRUE
But in that case, jmvtools::check gives an error... maybe expecting a different version of node.js complier?:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/jmvtools/node_modules/jamovi-compiler/index.js:52
(async function() {
^^^^^^^^
SyntaxError: Unexpected token function
Re: Mac system jmvtools check does not work
could you run this:
installed.packages()['node','LibPath']
it will tell you where the node package is installed. then navigate to that location and tell me what's there.
there's *supposed* to be a node/node-darwin/bin/node
with thanks
installed.packages()['node','LibPath']
it will tell you where the node package is installed. then navigate to that location and tell me what's there.
there's *supposed* to be a node/node-darwin/bin/node
with thanks
-
- Posts: 14
- Joined: Thu Nov 12, 2020 1:49 am
Re: Mac system jmvtools check does not work
Working from the downgraded version of node, I baked up the version of node it came with and copied the 16.14.2 version into: /Library/Frameworks/R.framework/Versions/4.1/Resources/library/node/node-darwin/bin/node.
That lets jmvtools:check() run!
And jmtools:install() gets started, but eventually crashes... looking into this. My guess is the right solution will be an update to node, but continuing to tinker a bit in the meantime.
That lets jmvtools:check() run!
And jmtools:install() gets started, but eventually crashes... looking into this. My guess is the right solution will be an update to node, but continuing to tinker a bit in the meantime.