Skip to content

Instantly share code, notes, and snippets.

@apowers313
Created December 8, 2021 17:49
Show Gist options
  • Select an option

  • Save apowers313/616e4d433c0f7b4dbab29514a5f583a5 to your computer and use it in GitHub Desktop.

Select an option

Save apowers313/616e4d433c0f7b4dbab29514a5f583a5 to your computer and use it in GitHub Desktop.
Deno Redis Compat
// setup:
// npm init -y
// npm install --save redisgraph.js
// run with:
// deno run --allow-all --unstable --compat test.ts
const RedisGraph = require("redisgraph.js").Graph;
let graph = new RedisGraph("social");
// fails with error:
/*
error: Uncaught (in promise) Error: Cannot find module 'tls'
Require stack:
- /Users/ampower/Projects/proto/redisgraph-test-deno/node_modules/redis/index.js
- /Users/ampower/Projects/proto/redisgraph-test-deno/node_modules/redisgraph.js/src/graph.js
- /Users/ampower/Projects/proto/redisgraph-test-deno/node_modules/redisgraph.js/index.js
- /Users/ampower/Projects/proto/redisgraph-test-deno/test2.ts
const err = new Error(message) as Error & {
^
at Function._resolveFilename (https://deno.land/[email protected]/node/module.ts:393:19)
at Function._load (https://deno.land/[email protected]/node/module.ts:500:29)
at Module.require (https://deno.land/[email protected]/node/module.ts:216:21)
at require (https://deno.land/[email protected]/node/module.ts:1331:16)
at Object.<anonymous> (file:///Users/ampower/Projects/proto/redisgraph-test-deno/node_modules/redis/index.js:4:11)
at Module._compile (https://deno.land/[email protected]/node/module.ts:251:36)
at Object.Module._extensions..js (https://deno.land/[email protected]/node/module.ts:1276:10)
at Module.load (https://deno.land/[email protected]/node/module.ts:230:34)
at Function._load (https://deno.land/[email protected]/node/module.ts:539:14)
at Module.require (https://deno.land/[email protected]/node/module.ts:216:21)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment