Running npm package in cell like one would do on command line
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
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
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