Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES Import/Export Problem? #20

Open
milan2sky opened this issue Nov 15, 2024 · 0 comments
Open

ES Import/Export Problem? #20

milan2sky opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels
help wanted Extra attention is needed invalid This doesn't seem right

Comments

@milan2sky
Copy link
Collaborator

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/plebnames/index.js b/node_modules/plebnames/index.js
index 1021cc8..2bd94b5 100644
--- a/node_modules/plebnames/index.js
+++ b/node_modules/plebnames/index.js
@@ -20,7 +20,8 @@ __export(util_exports, {
   hexToBytes: () => hexToBytes,
   normalizeAsciiToBech32: () => normalizeAsciiToBech32
 });
-import { bech32 } from "bech32";
+// import { bech32 } from "bech32";
+const bech32 = require('bech32').bech32;
 var OpcodesHex = /* @__PURE__ */ ((OpcodesHex2) => {
   OpcodesHex2["OP_RETURN"] = "6a";
   return OpcodesHex2;
@@ -500,8 +501,14 @@ async function followNameHistory(name, options) {
   }
   return history;
 }
-export {
+
+module.exports = {
   PlebNameHistory,
-  mod_exports as bitcoinExplorer,
-  util_exports as util
+  bitcoinExplorer: mod_exports,
+  util: util_exports
 };
+// export {
+//   PlebNameHistory,
+//   mod_exports as bitcoinExplorer,
+//   util_exports as util
+// };

This issue body was partially generated by patch-package.

@milan2sky milan2sky added help wanted Extra attention is needed invalid This doesn't seem right labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants