bionode / bionode-sra

Node.js wrapper for SRA Toolkit
bionode.io
MIT License
6 stars 3 forks source link

Can't run on ZSH #3

Closed olgabot closed 9 years ago

olgabot commented 9 years ago

I'm able to npm install this module, and I recently switched to oh-my-zsh as my shell instead of bash, and I can't seem to use it, despite putting the $HOME/node_modules into my path. The full log is below.

➜  projects  npm install bionode-sra
-
> bionode-sra@1.0.1 preinstall /Users/olga/node_modules/bionode-sra
> cd sra; make

mkdir -p build
curl http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.3.5-2/sratoolkit.2.3.5-2-mac64.tar.gz -o build/sratoolkit.2.3.5-2-mac64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26.1M  100 26.1M    0     0   977k      0  0:00:27  0:00:27 --:--:--  769k
cd build; tar xzvf sratoolkit.2.3.5-2-mac64.tar.gz
...
x sratoolkit.2.3.5-2-mac64/schema/vdb/vdb.vschema
mv build/sratoolkit.2.3.5-2-mac64/bin bin
bionode-sra@1.0.1 ../node_modules/bionode-sra
├── minimist@1.1.0
├── JSONStream@0.8.4 (through@2.3.6, jsonparse@0.0.5)
└── through2@0.5.1 (xtend@3.0.0, readable-stream@1.0.33)
➜  projects  export PATH=$PATH:$HOME/node_modules        
➜  projects  bionode-sra fastq-dump SRP041736                
zsh: permission denied: bionode-sra
➜  projects  chmod ugo+x ~/node_modules/*
➜  projects  bionode-sra fastq-dump SRP041736
zsh: permission denied: bionode-sra
➜  projects  ll ~/node_modules 
total 0
drwxr-xr-x  14 olga  staff   476B Nov 27 12:16 bionode
drwxr-xr-x  14 olga  staff   476B Nov 27 12:27 bionode-sra

Full log

bmpvieira commented 9 years ago

Have you tried npm install bionode-sra -g? Usually when you want to use a Node module as a command line tool you use -g to install it globally. If you want to install it locally in a project folder to use the JS API instead, then you don't use -g and do var sra = require(bionode-sra) in your code. However, even if you installed it locally, you can still find the bionode-sra executable in ./node_modules/.bin/bionode-sra and use it as a CLI tool. You shouldn't need to mess with PATH and chmod. I've just tried it in zsh and it worked (btw, I use fish).

olgabot commented 9 years ago

Yes, that was the issue, thanks!


Olga Botvinnik PhD Program in Bioinformatics and Systems Biology Gene Yeo Laboratory http://yeolab.ucsd.edu/yeolab/Home.html | Sanford Consortium for Regenerative Medicine University of California, San Diego www http://olgabotvinnik.com | blog http://blog.olgabotvinnik.com/ | github http://github.com/olgabot | twitter http://twitter.com/olgabot | linkedin http://www.linkedin.com/in/olgabotvinnik

2014-12-02 6:08 GMT-08:00 Bruno Vieira notifications@github.com:

Have you tried npm install bionode-sra -g? Usually when you want to use a Node module as a command line tool you use -g to install it globally. If you want to install it locally in a project folder to use the JS API instead, then you don't use -g and do var sra = require(bionode-sra) in your code. However, even if you installed it locally, you can still find the bionode-sra executable in ./node_modules/.bin/bionode-sra and use it as a CLI tool. You shouldn't need to mess with PATH and chmod. I've just tried it in zsh and it worked (btw, I use fish http://fishshell.com).

— Reply to this email directly or view it on GitHub https://github.com/bionode/bionode-sra/issues/3#issuecomment-65235093.