/demo/dist/app.service.js:14
const waku_relayer_client_1 = require("@railgun-community/waku-relayer-client");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /demo/node_modules/@railgun-community/waku-relayer-client/dist/index.js from /demo/dist/app.service.js not supported.
Instead change the require of index.js in /demo/dist/app.service.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/demo/dist/app.service.js:14:31)
at Object.<anonymous> (/demo/dist/app.controller.js:14:23)
at Object.<anonymous> (/demo/dist/app.module.js:11:26)
at Object.<anonymous> (/demo/dist/main.js:4:22)
error Command failed with exit code 1.
Reproduction steps:
nest new demo
demo
project and add deps:yarn add @railgun-community/waku-relayer-client
RailgunWakuRelayerClient
inapp.service.ts
yarn run start
Demo code:
but got this error: