Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to use the library with Common js project

オープン
#470 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js, typescript

調査の方向性

まず、createLBTCDepositAddress.ts の CommonJS ロード例を再現し、src/index.js の ES モジュールエントリを確認します。CJS Node プロジェクトでドキュメントに記載された動的 import パスを検証し、esbuild の CJS 失敗と比較します。実行可能な例に基づいて、サポートされている使用方法が確認されるか、互換性に関する解決策が明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I tried using the library as recommened in my CJS project

If you're using CommonJS, the module can be loaded asynchronously using const wally = await import('wallycore') or import('wallycore').then(wally => { ... }).

but i fails with
require() of ES Module /node_modules/wallycore/src/index.js from .../createLBTCDepositAddress.ts not supported.\nInstead change the require of index.js in ./createLBTCDepositAddress.ts to a dynamic import() which is available in all CommonJS modules.

I tried using esbuild to import the project as cjs module but it is not able to convert due to
✘ [ERROR] Top-level await is currently not supported with the "cjs" output format

Is there a recommended way to use it in the CJS node project, or any example project i can follow. please let me know, thank you!

主要言語
C
スター
310
フォーク
160
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ElementsProject/libwally-core のほかの issue

ElementsProject/libwally-core の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。