Skip to content
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

Running npm package in cell like one would do on command line #40

Open
bazini627 opened this issue Jan 31, 2019 · 2 comments
Open

Running npm package in cell like one would do on command line #40

bazini627 opened this issue Jan 31, 2019 · 2 comments

Comments

@bazini627
Copy link

Is it possible to run a npm package within a cell after it's been installed like you would from the command line? I have installed shp2json with npm.install('shp2json') and would like to then run it with !shp2json /path/to/shapefile > output.json but receive an error saying /bin/sh: 1: shp2json: not found

@glynnbird
Copy link
Member

Not at the moment @bazini627. The npm modules are installed for development, so any binary executables are not added to the path.

This is where you'd find installed npm modules, if you want to use absolute paths to the executables:

https://github.com/pixiedust/pixiedust_node/blob/master/pixiedust_node/node.py#L155-L159

@twosdai
Copy link

twosdai commented Apr 7, 2020

I am not sure if this would change anything or help but couldn't you instead run
!npm install shp2json -g
and then access it like you would normally so

!shp2json /path/to/shapefile > output.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants