-
Notifications
You must be signed in to change notification settings - Fork 35
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
[BUG] @sei-js/cosmjs
package importing unexported member of @sei-js/proto
#138
Comments
@sei-js/cosmjs
package importing unexported member of @sei-js/proto
@ellemedit can you try bumping your @sei-js/proto to version 4+? |
I don't use
Update: I tried with
![]() But it just a type definition file which is not needed for pure commonjs/esm itself. I think I attached import trace for more clues:
|
@codebycarson could you check it? |
@ellemedit looks like I had the same issue - did you manage to resolve it? |
@besated @codebycarson // it wasn't fixed. In latest
|
yes, current workaround script something like: var fs = require("fs");
var path = require("path");
var targetFiles = [
"./node_modules/@sei-js/cosmjs/dist/cjs/utils/serialize.js",
"./node_modules/@sei-js/cosmjs/dist/esm/utils/serialize.js",
];
const asIs = "require('@sei-js/proto/types/cosmos/tx/v1beta1/tx')";
const toBe = "require('cosmjs-types/cosmos/tx/v1beta1/tx');";
targetFiles.forEach((file) => {
const filePath = path.join(__dirname, "YOUR PATH", file);
console.log("patch file path", filePath);
const fileContents = fs.readFileSync(filePath, {
encoding: "utf-8",
});
var result = fileContents.replace(asIs, toBe);
fs.writeFileSync(filePath, result);
}); with postinstall hook. @seangeng |
Hey @ellemedit @seangeng , this is fixed in version 1.0.5 onwards. Turns out that serialize function was importing "SignDoc" from @sei-js/proto, however it was importing the typescript type instead of the actual class itself. This has been resolved in the latest version of @sei-js/cosmjs. Apologies for the issues here. |
@codebycarson thank you for supporting! I see my CI/CD building properly. |
Seid version
build time error (next.js):
the line is:
and the
@sei-js/proto/package.json
:It only export top level
index.*
module. So bundlers cannot build this.SeiJS package & version
@sei-js/cosmjs@1.0.1
@sei-js/proto@3.0.1
The text was updated successfully, but these errors were encountered: