New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run on ZSH #3

Closed
olgabot opened this Issue Nov 27, 2014 · 2 comments

Comments

2 participants
@olgabot

olgabot commented Nov 27, 2014

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

This comment has been minimized.

Member

bmpvieira commented Dec 2, 2014

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

This comment has been minimized.

olgabot commented Dec 3, 2014

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
#3 (comment).

@bmpvieira bmpvieira closed this Dec 3, 2014

@bmpvieira bmpvieira added the question label Apr 4, 2017

@bmpvieira bmpvieira self-assigned this Apr 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment