Closed Perelyn-sama closed 3 weeks ago
hey, not sure why it's throwing that, can you please include these scripts in a package.json and run from them, these are recommended settings by https://github.com/solana-developers/program-examples
"scripts": {
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
"build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
"deploy": "solana program deploy ./program/target/so/counter_program.so"
}
and tsconfig.json can look like this,
{
"compilerOptions": {
"types": ["mocha", "chai", "node"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true
}
}
and example working program is also here, https://github.com/thearyanag/solana-program-examples/tree/main/basics/counter/steel
I got the same error when I ran your version :/
@HardhatChad please help :/
found a solution, use base64
insteaed of bs64
program/cargo.toml
# bs64 = "0.1.2"
base64 = "0.21"
Also, this might be just an m1 issue.
@thearyanag I'm assuming you're not on an m1, right? Since the tests work for you
found a solution, use base64 insteaed of bs64
Did this resolve the issue? Do we need to update the template with this for it to build on M1?
Did this resolve the issue?
yes, it did
I ran
steel new demo
andcargo build-sbf
and everything worked fine but when I tried to runcargo test-sbf
I get these errors: