jspm / project

Roadmap and management repo for the jspm project
161 stars 8 forks source link

@walletconnect: The requested module 'pino' does not provide an export named 'levels' #344

Closed sgraphics closed 1 week ago

sgraphics commented 2 months ago

Was adding @web3auth/wallet-connect-v2-adapter but got "The requested module 'pino' does not provide an export named 'levels'"

The error seems to be originating from @walletconnect package logger@2.1.2 dependency.

Is there something I can do to fix it myself?

sgraphics commented 2 months ago

After I tried to ignore this error I get some other error. What might be the cause? Would appreciate any help! Cc. @guybedford

Uncaught TypeError: Failed to resolve module specifier "quick-format-unescaped". Relative references must start with either "/", "./", or "../".

guybedford commented 2 months ago

I managed to make some progress on this in

https://jspm.org/sandbox#H4sIAAAAAAAAA+1dWZPbNhJ+969QJg/J1oaijjm9My7ZzsTH2okTezbHyxREQhJmeJkgpZG38t+3AZAUCYFNUpp4XFup2qxH5NdfN65GowGS51+5oZOsI9pbJL735NF5/g8l7pNHvd65TxPScxYk5jS5OEiTmXV6IG8kLPHok6tA/uue2+p3IRIQn14cLBldRWGcHPScMEhoABQr5iaLC5cumUMt+eO7HgtYwohncYd49GIICs5tZcH5NHTXkvUry4J/er3X79+97b2gAY1JEsa9V77g770lkbx76bKkd/XLm8dQniTij217nkP7Nzzy+yy0v37m/DC9DJ/+/MPTZz9fjUbeh8EvZ2cvbj+8cb6/8W8+PHde/HYSTN+mi8tPn7wPz+bPLmdXg9P4zZQcz1//mP5++Pz2hL29HEzjeHz16pb8/nLqntI/vr9bLV5Nrw5fv/nx9burdDj4mdx8/OPy3+vDFXXW/wxvf50/BSMtS5Snd86dmEVJT1T+xQGTxfBJJCv3v7Is2UV+8Di7AJcmohC2E8bUDkKXemzK7Wk6m9EYUAdFmUlR2CDyH2+EJqP+oD8sicbhitM4owChg+8KTSs6HZM0Wdgr4nk0saAFA+ok1nJkEZdECa6yWXpy2h+O+oe2y3iSoZ4r0H9GTxWkT7kvjJI2/alMO+BOGNFKpRhsKN0GwNfTlHmuDWy2Sx0o/Dvi3NJEUNcXgQZzFlD4ZUWi98eT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fsLfUL7HcUWm5TZPmPbcprPwVQL23w6KUOIzU6xDVs+PtPWkO1TM5/BCz/K/1/8d26rh0/EBx8eqQ9c9C7f996GburR3vsF83lPfQGi55OI9/KzdTz7gkT+AQnC14HT47FzUTu2uOVLVosLVrV1XZysq9wT1vagK3IexmzOgosDEsA60Q9TfvBEt7jyBQvFIj9f0cvtfg6182NWLeoV8j2xwY9+xuJfkkC9oqSvPjnQu8h+V+5lhBcGLdk9BZcv5OuZPzAB0mRFWJIZ/O03Lb5b8c0/NryhR/teOP/WzC6Bm0o7t9XHTM5t9ZGV/wFMW/MmfGUAAA==

Main issues were:

With that it seems like it might be working now. Let me know if you need any further help.

sgraphics commented 1 month ago

This is great, I now have the entire web3auth stack operational except for one library @web3auth/coinbase-adapter. Apparently it is doing import i from "@coinbase/wallet-sdk" but "i is not a constructor". I think it should instead do import { CoinbaseWalletSDK as i } from "@coinbase/wallet-sdk"

guybedford commented 1 month ago

web3auth/coinbase-adapter seems to be working for me in this case:

https://jspm.org/sandbox#H4sIAAAAAAAAA91c3XObSBJ/z1/Bal92qxawZNn5ODulJJvaulSc5M6bh3tKDTCSxgaGYwbLylb+9+uZAQRoaJDtLbvuIZERv/51z1dPdzPo7KeIh3KbUWctk/j1s7Pqg5Lo9TPHOUuoJE64Jrmg8nxSyKX7YqJvSCZj+vprqj+jM99c1yIpSej55IbRTcZzOXFCnkqaAsWGRXJ9HtEbFlJXX/zmsJRJRmJXhCSm51NQcOYbC84CHm0160+uCx+O8+Hyy4XzB01pTiTPnX8mit+5IJm++z5i0vn674+voD0yE698f1VBvSuRJR7j/s9fZ5/W//nj7fXvF0f59vL7h8uv03X4bv3lzz8/fP747vjD0Xv/8/cXtx8v2e3n6dfpxeXlhl9eTrfi07++H/1+8e7NR/HfbCZu3rwBna6rzHPORJizTDqqL88nTFuVkAya8hfcLr8Qk1fOX9rOyWJDg2NSyLUfcpYGRFCXRCSTNAfMpDae1FanWfKqX2jx0jvyZn7EhPRjFnhUJD5LI3o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soJ9Xm2zj1lpRPmXAiesxVLzyck5ek24YWYvO5a3Hrn37DoH0dwKrvfQa98KrvDvFfrqJeH0Xfx/6EJNiyN+MYzb3s75+V1615JeG7RUt4zcPX6DY+pF/PVL2RDmCyt+wX7EYJff1XCuwaf+eaXGM588wsR/wMcTIaVOUIAAA==

Let me know how I can hit that import i issue you've having if you;re still finding that.

sgraphics commented 1 month ago

Thanks for checking so quickly and yea you are right it does not immediately show. Only when actually using new await CoinbaseAdapter().init() does it use the invalid constructor. Is this in scope?

  <script type="module">
    import CoreNodelibsBuffer from "@jspm/core/nodelibs/buffer";
    window.global = window;
    window.Buffer = CoreNodelibsBuffer.Buffer;
  </script>

  <script type="module">
    import { CoinbaseAdapter } from "@web3auth/coinbase-adapter";
    const adapter = new CoinbaseAdapter({ clientId : "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ" }); //taken from https://web3auth.io/docs/sdk/pnp/web/adapters/coinbase#helper-sdks-menu example
    await adapter.init(); //Error here!
  </script>
guybedford commented 1 month ago

Okay, so the above is actually an interop problem, which strictly speaking is a bug in this file:

https://unpkg.com/@web3auth/coinbase-adapter@9.0.2/dist/lib.cjs/coinbaseAdapter.js

In the above it does this:

var CoinbaseWalletSDK = require('@coinbase/wallet-sdk');

// later on

new CoinbaseWalletSDK(...)

when the file at @coinbase/wallet-sdk is https://unpkg.com/@coinbase/wallet-sdk@4.1.0/dist/index.js and looks like:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoinbaseWalletSDK = void 0;
// Copyright (c) 2018-2024 Coinbase, Inc. <https://www.coinbase.com/>
const CoinbaseWalletSDK_1 = require("./CoinbaseWalletSDK");
exports.default = CoinbaseWalletSDK_1.CoinbaseWalletSDK;
var CoinbaseWalletSDK_2 = require("./CoinbaseWalletSDK");
Object.defineProperty(exports, "CoinbaseWalletSDK", { enumerable: true, get: function () { return CoinbaseWalletSDK_2.CoinbaseWalletSDK; } });

which therefore has the shape module.exports === { default: CoinbaseWalletSDK, CoinbaseWalletSDK }.

So the fix would be for the consumer to change their code to instead do:

var { CoinbaseWalletSDK } = require('@coinbase/wallet-sdk');

or if they are concerned about interop issues to something like:

var CoinbaseWalletSDK = require('@coinbase/wallet-sdk');
if (CoinbaseWalletSDK.CoinbaseWalletSDK)
  CoinbaseWalletSDK = CoinbaseWalletSDK.CoinbaseWalletSDK;

I would therefore advise posting an issue to the original repo about this further. If there is no desire to change on their side then we can potentially look into solving this through JSPM-side overrides, but usually we try to avoid that whenever possible.

Let me know if you need any further help at all.

guybedford commented 1 month ago

And if they are transpiling ES modules, their transpilation isn't applying the __esModule interop pattern correctly where it is supposed to output: var CoinbaseWalletSDK = require('@coinbase/wallet-sdk').__esModule ? require('@coinbase/wallet-sdk').default : require('@coinbase/wallet-sdk'); kind of thing.

sgraphics commented 1 week ago

Bug fixed in https://github.com/Web3Auth/web3auth-web/issues/1967

sgraphics commented 1 week ago

Thanks for information, all good now.