Comments (8)
@ellemedit can you try bumping your @sei-js/proto to version 4+?
from sei-js.
@ellemedit can you try bumping your @sei-js/proto to version 4+?
I don't use @sei-js/proto
directly, it's dependency of @sei-js/cosmjs
. So I can try with custom resolutions.
And it looks like it works. Thank you. (Oops, I didn't check correctly)
Update:
I tried with @sei-js/proto@internal-vm
and checked package.json:
"exports": {
".": {
"import": "./dist/esm/codegen/index.js",
"require": "./dist/cjs/codegen/index.js",
"types": "./dist/types/codegen/index.d.ts"
},
"./types/*": "./dist/types/codegen/*"
}
But it just a type definition file which is not needed for pure commonjs/esm itself. I think require
means a commonjs/esm module not type defs. But there isn't a thing or module for the required path.
I attached import trace for more clues:
../../node_modules/@sei-js/cosmjs/dist/esm/utils/serialize.js:9:10
Module not found: Can't resolve '@sei-js/proto/types/cosmos/tx/v1beta1/tx'
Import trace for requested module:
../../node_modules/@sei-js/cosmjs/dist/esm/utils/index.js
../../node_modules/@sei-js/cosmjs/dist/esm/index.js
from sei-js.
@codebycarson could you check it?
from sei-js.
@ellemedit looks like I had the same issue - did you manage to resolve it?
from sei-js.
@besated @codebycarson // it wasn't fixed.
In latest @sei-js/[email protected]
not able to import package too like:
Failed to compile.
../../node_modules/@sei-js/cosmjs/dist/esm/utils/serialize.js:2:0
Module not found: Package path ./dist/types/codegen/cosmos/tx/v1beta1/tx is not exported from package /home/runner/work/wallet-workspace/wallet-workspace/node_modules/@sei-js/proto (see exports field in /home/runner/work/wallet-workspace/wallet-workspace/node_modules/@sei-js/proto/package.json)
from sei-js.
@ellemedit looks like I had the same issue - did you manage to resolve it?
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
from sei-js.
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.
from sei-js.
@codebycarson thank you for supporting! I see my CI/CD building properly.
from sei-js.
Related Issues (20)
- [BUG] According to the first step of Javascript Reference, an error is reported HOT 2
- [BUG] Error on wallet.serialize HOT 3
- [SEI-6267] [SEI-6265] [BUG] test
- [SEI-6278] [BUG] According to the first step of Javascript Reference, an error is reported
- [SEI-6283] [BUG] Error on wallet.serialize
- What am I missing? HOT 1
- [Feature request] Add python as a grpc target HOT 1
- [BUG] Failed on executeMultiple code 13 HOT 1
- [BUG] Can`t use SeiWalletProvider as documentation show HOT 1
- TypeError: (0 , _sei_js_core__WEBPACK_IMPORTED_MODULE_11__.connect) is not a function HOT 1
- [BUG] Module not found: Can't resolve '@sei-js/proto/types/cosmos/tx/v1beta1/tx' HOT 3
- [BUG] The 'proto' library does not have a module to handle the 'seiprotocol.seichain.evm.MsgEVMTransaction' message. HOT 1
- [BUG] calculateFee calculates wrongly HOT 1
- Having issue in @sei-js/core ^3.0.2 HOT 3
- Consider re-exporting cosmjs dependencies HOT 2
- [SEI-5656] tree-shaking not working properly HOT 3
- [SEI-6101] Even I changed wallet, it uses autoConnect wallet when I try to submit transaction. HOT 1
- [SEI-5972] [BUG] Next.js frontend Integration with @sei-js requires global CSS module.
- [SEI-6102] [BUG] Unable to search transactions using events. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sei-js.