zingZ
Denoβ€’12mo agoβ€’
1 reply
zing

Different behaviour between Node and Deno with npm package

I'd like to use deno for a project that requires packages which are only available on npm. The issue I'm having is that executing the same script on deno and node is producing different results.
- on node, the execution produces the expected results(some "forward" logs) - on deno, the execution pauses for a second at startup and then exits with no logs The script I'm working on is as follows: ```ts import { createChainSynchronizationClient, createInteractionContext } from 'npm:@cardano-ogmios/client' export const createContext = () => createInteractionContext( err => console.error(err), () => console.log("Connection closed."), { connection: { host: "<url>" , port: 443, tls: true } } ); export async function runExample() { const context = await createContext(); // console.log('here') const client = await createChainSynchronizationClient(context, { rollForward: async () => { console.log("forward") }, rollBackward: async () => { console.log("backward") } }); await client.resume(); } runExample() ``` uncommenting the console.log('here') and running with deno reveals the script isn't getting there, so presumably something is being held up inside createContext, which is calling createInteractoinContext(..)`. Obviously this is a function in the lib so I'm not expecting anyone to know whats wrong, but I was hoping someone with knowledge about the way deno interacts with npm packages might suggest what I should look for within the lib that could cause this 'silent exit'? thanks
Was this page helpful?