Open deviantart414 opened 1 year ago
Your environment needs to support ESM to run this code.
It'll be modifying tsconfig and possibly using ts-node/esm. To be honest, I'm not very familiar with the setup. Every environment is different and it's typically guess-and-check with various config settings until it runs.
with esm enabled I get another error on import
>> ts-node-esm index.ts
.config/yarn/global/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:366
throw new ERR_MODULE_NOT_FOUND(
^
CustomError: Cannot find module 'testrailgun/node_modules/@railgun-community/waku-relayer-client/dist/railgun-waku-relayer-client' imported from testrailgun/node_modules/@railgun-community/waku-relayer-client/dist/index.js
@therealjmj can you please provide an example setup? I have tried everything can not get this module to import successfully
am not able to start RailgunWakuRelayerClient using typescript. am able to import and use all other railgun repos.
steps to reproduce
1) create new directory and yarn init 2) yarn add @railgun-community/waku-relayer-client 3) create file test.ts with code below 4) run
ts-node test.ts
Using node v18 and ts-node v10
A sample script importing/using both
@railgun-community/waku-relayer-client
and@railgun-community/quickstart
would be helpful.