SIESTA-eu / wp15

work package 15, use case 2
0 stars 0 forks source link

Openneuro/cli does not work / requires root? #11

Closed marcelzwiers closed 1 month ago

marcelzwiers commented 1 month ago

If I follow the data download instructions for usecase 2.2 I get the following errors:

$ node -v
v13.13.0
$ npm install -g @openneuro/cli
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated async-cache@1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
npm WARN checkPermissions Missing write access to /usr/local/lib
npm WARN notsup Unsupported engine for @openneuro/cli@4.23.0: wanted: {"node":">=18.0.0"} (current: {"node":"13.13.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: @openneuro/cli@4.23.0
npm WARN notsup Unsupported engine for graphql@16.8.1: wanted: {"node":"^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"} (current: {"node":"13.13.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: graphql@16.8.1
npm WARN notsup Unsupported engine for @graphql-tools/mock@9.0.2: wanted: {"node":">=16.0.0"} (current: {"node":"13.13.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: @graphql-tools/mock@9.0.2
npm WARN notsup Unsupported engine for @graphql-tools/utils@10.2.0: wanted: {"node":">=16.0.0"} (current: {"node":"13.13.0","npm":"6.14.4"})
[...]
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
marcelzwiers commented 1 month ago

Oops, I misread my node.js version

robertoostenveld commented 1 month ago

I must say that I did not carefully consider the node version, and just used the one that I had installed in the past.

mac036> which node
/Users/roboos/.nvm/versions/node/v18.3.0/bin/node
mac036> node -v
v18.3.0

I think that we need better documented requirements for the compute environment. Idem for MATLAB versions, R versions, etc.

robertoostenveld commented 1 month ago

unclear software versioning makes the pipeline execution fragile.

marcelzwiers commented 1 month ago

After installing nvm, the latest Node.js version (v22.2.0) and the openneuro cli, I now get this error if I run openneuro login:

[...]))&&(_h(En),(function(e){"use strict";fh.manage(e,"runMain",(function(t,r,i){var n=I.argv,s=n[1],a=Eu(s,null,!0),o=Yc.from(a),u=fh.find(e,"runMain",dh(o.range));return null===u?Reflect.apply(r,this,i):Reflect.apply(u,this,[t,r,i])})),fh.wrap(e,"runMain",(function(){var e,t=I.argv,r=t[1],i=Eu(r,null,!0),n=Pc.state.package.default,s=ge(i);Yc.get(s)===n&&Yc.set(s,n.clone());try{_c(r,null,!0)}catch(e){throw!n.options.debug&&is(e)?ds(e,{filename:i}):fs(e),e}e=O(I,"_tickCallback"),"function"==typeof e&&Reflect.apply(e,I,[])})),bc.runMain=e.runMain})(En),Nh(I)),ef&&(function(e){"use strict";e.console=xo.console.module.exports,e.process=xo.process.module.exports})(of),tf&&nf&&Ih(Ko)),n.default=Jh})]).default;

TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
    at $o (/home/mrphys/marzwi/.nvm/versions/node/v22.2.0/lib/node_modules/@openneuro/cli/node_modules/esm/esm.js:1:224377)
    at wu (/home/mrphys/marzwi/.nvm/versions/node/v22.2.0/lib/node_modules/@openneuro/cli/node_modules/esm/esm.js:1:227324)
    at Eu (/home/mrphys/marzwi/.nvm/versions/node/v22.2.0/lib/node_modules/@openneuro/cli/node_modules/esm/esm.js:1:227999)
    at Module.<anonymous> (/home/mrphys/marzwi/.nvm/versions/node/v22.2.0/lib/node_modules/@openneuro/cli/node_modules/esm/esm.js:1:295976)
    at n (/home/mrphys/marzwi/.nvm/versions/node/v22.2.0/lib/node_modules/@openneuro/cli/node_modules/esm/esm.js:1:279589)
    at Object.<anonymous> (/home/mrphys/marzwi/.nvm/versions/node/v22.2.0/lib/node_modules/@openneuro/cli/src/index.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1434:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
    at Module.load (node:internal/modules/cjs/loader:1249:32)
    at Module._load (node:internal/modules/cjs/loader:1065:12)
robertoostenveld commented 1 month ago

I am on the train and don't have enough bandwidth to install another node version. Could you try with 18.3.0, the version that I have?

marcelzwiers commented 1 month ago

That version works, although I get:

-----------------------------------------------------
Your OpenNeuro client is out of date. We strongly recommend you update to the most recent version for an optimal experience.
-----------------------------------------------------
robertoostenveld commented 1 month ago

Yes, I also got that confusing "out of date warning" with the latest version. Perhaps something to report on https://github.com/OpenNeuroOrg/openneuro, although they seem to be busy enough as it is.