Skip to content
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

Terrain deploy counter sample will not build #19

Closed
SABERiize opened this issue Apr 7, 2022 · 9 comments
Closed

Terrain deploy counter sample will not build #19

SABERiize opened this issue Apr 7, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@SABERiize
Copy link

SABERiize commented Apr 7, 2022

Fresh install of WSL2 Ubuntu, npm, rust, and localterra all installed to the latest version. When attempting to deploy the sample counter contract the build fails to parse manifest at /code/Cargo.toml and is caused by feature 'edition2021' is required.

I followed the cargo docs linked in the error to fix and migrate to edition2021 and updated the Cargo.toml file to reflect that but still get the same error.

The error also states that cargo version is 1.55.0, but as you can see below I have the latest cargo version installed (1.60.0). I was following terra docs exactly. Reinstalled ubuntu and tried again following the docs from every package instead with the same result.

version:
cargo -V
cargo 1.60.0 (d1fd9fe 2022-03-01)

command (npx has same results):
npm terrain deploy counter --signer validatpr

error:
npx terrain deploy counter --signer validator
using pre-baked 'validator' wallet on localterra as signer
Compiling hex v0.4.3
Compiling byteorder v1.4.3
Compiling uint v0.9.3
Compiling cosmwasm-std v0.16.7
Compiling cw-storage-plus v0.8.1
Compiling cosmwasm-storage v0.16.0
Compiling cw2 v0.8.1
Compiling counter v0.1.0 (/home/stevenjacobs/developer/test-dapp/contracts/counter)
Finished release [optimized] target(s) in 6.50s
Running script 'optimize': 'docker run --rm -v "$(pwd)":/code --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry cosmwasm/rust-optimizer:0.12.3
'
Info: RUSTC_WRAPPER=sccache
Info: sccache stats before build
Compile requests 0
Compile requests executed 0
Cache hits 0
Cache misses 0
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 0
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 0
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average cache read miss 0.000 s
Average cache read hit 0.000 s
Failed distributed compilations 0
Cache location Local disk: "/root/.cache/sccache"
Cache size 0 bytes
Max cache size 10 GiB
Building contract in /code ...
error: failed to parse manifest at `/code/Cargo.toml

Caused by:
feature 'edition2021' is required

The package requires the Cargo feature called 'edition2021', but that feature is not stabilized in this version of Cargo (1.55.0 (32da73ab1 2021-08-23)).
Consider trying a newer version of Cargo (this may require the nightly release).
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.
Finished, status of exit status: 101
Error: ENOENT: no such file or directory, open 'artifacts/counter.wasm'
Code: ENOENT`

@emidev98
Copy link
Contributor

emidev98 commented Apr 7, 2022

Thanks for submitting the issue @SteveDaMonsta. There is a release that is being tested actively that includes a fix for the issue.

For now is still experimental but if you want use the main branch to "npm link" and deploy the project in your local it should work.

There is a plan to release a new version of the library soon.

🍻!

@emidev98 emidev98 added the bug Something isn't working label Apr 7, 2022
@RylandCapital
Copy link

same exact issue. just letting you know. I was following terra academy course and got stuck on this step unfortunately.
image

@dan-turner
Copy link

Hi @emidev98 are you able to please provide some more specific instructions? How exactly can we leverage npm link to make it work?

I just tried installing the package via github:

npm uninstall -g @terra-money/terrain
npm install -g github:terra-money/terrain#main

But it's failing for another reason:

› terrain deploy counter --signer test1           

 ›   Error: command deploy not found

@dan-turner
Copy link

terrain --help also doesn't work?

› terrain --help                                
    Error: Unable to load configured help class "./src/lib/help", failed with message:
    Cannot find module '/Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/t
    errain/src/lib/help'
    Require stack:
    - /Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/terrain/node_module
    s/@oclif/help/lib/util.js
    - /Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/terrain/node_module
    s/@oclif/help/lib/command.js
    - /Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/terrain/node_module
    s/@oclif/help/lib/index.js
    - /Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/terrain/node_module
    s/@oclif/command/lib/command.js
    - /Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/terrain/node_module
    s/@oclif/command/lib/index.js
    - /Users/dan/.nvm/versions/node/v16.14.2/lib/node_modules/@terra-money/terrain/bin/run

@emidev98
Copy link
Contributor

emidev98 commented Apr 8, 2022

Hello @dan-turner, the command terrain --help is not working. A fix will be on going soon. If you find another issue which is not directly related to the one on the main post please open a new issue (terrain repo here) that way we do not mix topics, thanks.

@emidev98
Copy link
Contributor

emidev98 commented Apr 8, 2022

Hello @dan-turner and @RylandCapital,

Here you can find a guide which is not yet reviewed but it will help you to figure out how to use npm link with the main branch. If you find something that is not working as expected please let me know.

To give you a little bit more context of the issue you're facing please find this pr with the fix contextualized.

Thanks for submitting the issues!

@RylandCapital
Copy link

@emidev98 thank you for the help! will you post in here when the "edition2021" fix has been released?

@emidev98
Copy link
Contributor

emidev98 commented Apr 8, 2022

You're welcome, for sure I will keep you updated!

@emidev98
Copy link
Contributor

emidev98 commented Apr 8, 2022

A new release is available. Thanks for helping spotting this bugs.

@dan-turner the fix for new command will probably be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants
@dan-turner @SABERiize @RylandCapital @emidev98 and others