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

plv8x -i qs:/path/to/qs/package.json - Does not work #24

Open
bendiy opened this issue Jun 24, 2015 · 1 comment
Open

plv8x -i qs:/path/to/qs/package.json - Does not work #24

bendiy opened this issue Jun 24, 2015 · 1 comment

Comments

@bendiy
Copy link

bendiy commented Jun 24, 2015

The command in your example does not work as expected.
I'm running this:

git clone git://github.com/clkao/plv8x.git
cd plv8x
sudo npm i -g .
npm install LiveScript
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -l
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -i LiveScript:node_modules/LiveScript/package.json
npm install qs
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -i qs:node_modules/qs/package.json
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -l

It causes #23 to happen.

I did not want to install these packages globally with the -g flag, so I just ran npm install qs and pointed to the package.js.

What does work is this:

git clone git://github.com/clkao/plv8x.git
cd plv8x
sudo npm i -g .
sudo npm i -g LiveScript
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -l
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -i LiveScript
sudo npm i -g qs
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -i qs
plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -l

But that requires a global install of the packages I want to load.

@bendiy
Copy link
Author

bendiy commented Jul 21, 2015

I think I've found a work around for this issue. If I point to the full path, instead of the relative path, it loads the package correctly. So in the example above:

plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -i LiveScript:node_modules/LiveScript/package.json

needs to be:

plv8x -d postgresql://admin:admin@192.168.0.1:5432/testplv8x -i LiveScript:/home/my-user-here/some-path/node_modules/LiveScript/package.json

Can the README.md be changed to:

% npm i -g qs
% plv8x -i qs # same as: plv8x -i qs:/full/path/to/qs/package.json
% psql test

Or add support for relative paths?

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

1 participant