You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the noise. I was running into trouble using the version from git where lsc wasn't running properly, so I wasn't winding up with everything that was required to run. I had tried using the version from npm and that's where I was getting the errors. I would be good to update the npm version if at all possible.
I'm having an issue that looks very similar to #18. Any pointers on how to resolve?
# plv8x -d 'postgres://jason:<password>@localhost:5432/platinum33' -l
microtime: 9414 bytes
json-stringify-safe: 5041 bytes
qs: 16192 bytes
plv8x: 1038096 bytes
SELECT |> 'require("qs").parse("foo=bar&baz=1")' AS qs;
WARNING: failed to load module fs: Error: Cannot find module "./lib/" @[module: index package: qs]
WARNING: failed to load module qs: Error: Cannot find module "./lib/" @[module: index package: qs]
ERROR: TypeError: Cannot call method 'parse' of undefined
DETAIL: undefined() LINE 0: (function(){return require("qs").parse("foo=bar&baz=1")})
********** Error **********
ERROR: TypeError: Cannot call method 'parse' of undefined
SQL state: XX000
Detail: undefined() LINE 0: (function(){return require("qs").parse("foo=bar&baz=1")})
SELECT |> 'require("util").log("test")';
WARNING: failed to load module fs: Error: Cannot find module "fs" @[module: lib/index package: plv8x]
WARNING: failed to load module util: Error: Cannot find module "util" @[module: lib/index package: plv8x]
ERROR: TypeError: Cannot call method 'log' of undefined
DETAIL: undefined() LINE 0: (function(){return require("util").log("test")})
********** Error **********
ERROR: TypeError: Cannot call method 'log' of undefined
SQL state: XX000
Detail: undefined() LINE 0: (function(){return require("util").log("test")})
SELECT |> 'require("microtime").log("now")';
WARNING: failed to load module fs: Error: Cannot find module "fs" @[module: lib/index package: plv8x]
ERROR: TypeError: Cannot call method 'log' of undefined
DETAIL: undefined() LINE 0: (function(){return require("microtime").log("now")})
********** Error **********
ERROR: TypeError: Cannot call method 'log' of undefined
SQL state: XX000
Detail: undefined() LINE 0: (function(){return require("microtime").log("now")})
However, this one seems to work for some reason. I'm not sure if maybe it's because I have the syntax wrong fro this one.
SELECT |> 'require("json-stringify-safe")({"monkey":{"bot":"cat"}})'
"{"monkey":{"bot":"cat"}}"
The text was updated successfully, but these errors were encountered: