Closed caasi closed 11 years ago
does it work if bin
points to cmd.ls in package.{ls,json} ?
I got this after I changed every cmd.js to cmd.ls in package.{ls, json}:
$ plv8x -d test -l
/usr/bin/plv8x: line 1: #!/usr/bin/env: No such file or directory
/usr/bin/plv8x: line 2: syntax error near unexpected token `newline'
/usr/bin/plv8x: line 2: `require! <[fs resolve pg]>'
sudo npm i -g .
prepublish 沒跑,找不到 cmd.js ,安裝失敗。
npm run prepublish
sudo npm i -g .
plv8x -d test -l
安裝成功,但是 cmd.js 是用之前裝的 LiveScript 1.2.0 編譯, 而不是使用 plv8x 需要的 1.1.1 ,結果跑不起來。
npm i
sudo npm i -g .
plv8x -d test -l
安裝成功。 測試失敗,無法以帳密連結資料庫。 (目前以 Unix user 登入 PostgreSQL 。)
Try something like this:
sudo su postgres -c 'createuser -s caasi'
Before running:
sudo su postgres -c 'createuser -s caasi'
I dropped the old user:
DROP DATABASE test;
DROP DATABASE zh;
DROP ROLE caasi;
but I still got:
events.js:72
throw er; // Unhandled 'error' event
^
error: password authentication failed for user "caasi"
at Connection.parseE (/usr/lib/node_modules/plv8x/node_modules/pg/lib/connection.js:526:11)
at Connection.parseMessage (/usr/lib/node_modules/plv8x/node_modules/pg/lib/connection.js:371:17)
at Socket.<anonymous> (/usr/lib/node_modules/plv8x/node_modules/pg/lib/connection.js:86:20)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
after running plv8x -d test -l
with the user created by sudo su postgres -c 'createuser -s caasi'
Try edit /etc/postgresql/*/main/pg_hba.conf
and add this line, then sudo service postgresql restart
:
local all all ident
It works after I installed oidentd
and changed:
# IPv4 local connections:
host all all 127.0.0.1/32 md5
to:
# IPv4 local connections:
host all all 127.0.0.1/32 ident
Anyway, thanks for the help!
BTW, will plv8x be published with precompiled *.js in the future?
@cassi the version on npm will always have *.js bundled, so we just need to make sure it works in both dev env and from npm
@clkao I see, I should do sudo npm i -g plv8x
if I just want to use it.
And if I am a developer, I will always do the npm i
first after cloning.
I am still getting this error using Ubuntu 12.04 npm ERR! Error: ENOENT, chmod '/usr/lib/node_modules/plv8x.git/bin/cmd.js' cmd.ls in bin, no cmd.js
I did get it to work using @caasi suggestion to use npm i -g plv8x. Can we update the website to reflect this suggestion for normal user install?
https://github.com/clkao/plv8x indicates a npm i -g . should be enough, but this closed ticket shows that is not the case. why does ident make a difference?
anyways, thank you, I've installed it from npm. just wanted to make the suggestion for future users. Thanks. --dave http://dave.thehorners.com/tech-talk/random-tech/500-postgresql
sudo npm i -g .
gets
but
works