Closed goncer closed 10 months ago
@goncer, I just cloned the repo, and tried it with chopsticks v0.9.0, my vscode does not give import errors after changing import to
// /utils/Framework/XcmHelper.ts
import {
Blockchain,
BuildBlockMode,
setupWithServer,
} from "@acala-network/chopsticks";
import { StorageValues } from "@acala-network/chopsticks-core";
Which script give the error here?
@goncer You are importing from lib
which is now changed to cjs
or esm
. Whatever custom configuration you have it is pointing to wrong location
@goncer also seems like you're importing setStorage using file path. You don't need to. It's a global export
It fails when running the tests.. :s
tried your repo and was able to reproduce
Adding type: "module"
could fix this issue, it lets ts-jest to load chopsticks as esm.
Another problem is that chopsticks package can only support either cjs or esm, because we use __dirname
and __filename
in plugins, we probably need to use a bundler for dual bundle so these can be handled
could be related: https://github.com/jestjs/jest/issues/11563
@goncer can you try 0.9.1-2
Works with 0.9.1-2! :tada: Thanks @ermalkaleci , @qiweiii the best support ever!
Hey, I'm running into issues when upgrading to 9.0.0. first, looks like set-storage is being moved,
and after fix it, it looks like that some exports are missing or something,
Looks like that the package is not compatible anymore with esm :(