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

Can't build txwrapper-core: error TS2345 #287

Closed
gituser opened this issue Mar 18, 2023 · 3 comments
Closed

Can't build txwrapper-core: error TS2345 #287

gituser opened this issue Mar 18, 2023 · 3 comments
Labels
Support Support Issue

Comments

@gituser
Copy link

gituser commented Mar 18, 2023

When running yarn build on NodeJS v16.x or v14.x getting this weird error:

lerna notice cli v4.0.0
lerna info Executing command in 8 packages: "yarn run build"
lerna info run Ran npm script 'build' in '@substrate/txwrapper-dev' in 3.1s:
rimraf /root/txwrapper-core/packages/txwrapper-dev/lib/
lerna info run Ran npm script 'build' in '@substrate/txwrapper-core' in 7.2s:
rimraf /root/txwrapper-core/packages/txwrapper-core/lib/
lerna info run Ran npm script 'build' in '@substrate/txwrapper-substrate' in 3.2s:
rimraf /root/txwrapper-core/packages/txwrapper-substrate/lib/
lerna info run Ran npm script 'build' in '@substrate/txwrapper-registry' in 5.6s:
rimraf /root/txwrapper-core/packages/txwrapper-registry/lib/
lerna info run Ran npm script 'build' in '@substrate/txwrapper-orml' in 5.6s:
rimraf /root/txwrapper-core/packages/txwrapper-orml/lib/
lerna info run Ran npm script 'build' in '@substrate/txwrapper-template' in 2.1s:

lerna info run Ran npm script 'build' in '@substrate/txwrapper-polkadot' in 5.7s:
rimraf /root/txwrapper-core/packages/txwrapper-polkadot/lib/
lerna ERR! yarn run build exited 1 in '@substrate/txwrapper-examples'
lerna ERR! yarn run build stdout:
rimraf /root/txwrapper-core/packages/txwrapper-examples/lib/
common/util.ts:37:9 - error TS2345: Argument of type '({ error, result }: { error: any; result: any; }) => any' is not assignable to parameter of type '(value: unknown) => any'.
  Types of parameters '__0' and 'value' are incompatible.
    Type 'unknown' is not assignable to type '{ error: any; result: any; }'.

37   .then(({ error, result }) => {
           ~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in common/util.ts:37

lerna ERR! yarn run build exited 1 in '@substrate/txwrapper-examples'

Any ideas how to fix this?

@TarikGul
Copy link
Member

Are you running this against main?

Before running yarn build as well, I would make sure that packages are correctly installed by running a sanity yarn install.

I ran the built the packages locally and in the CI and everything is building as it should.

@gituser
Copy link
Author

gituser commented Mar 18, 2023

Are you running this against main?

Before running yarn build as well, I would make sure that packages are correctly installed by running a sanity yarn install.

I ran the built the packages locally and in the CI and everything is building as it should.

I've tried both latest tag v5.0.1 and main branch. Sure I've ran yarn install before that.

@TarikGul TarikGul added the Support Support Issue label Oct 11, 2023
@bee344
Copy link
Collaborator

bee344 commented Mar 20, 2024

Closing this as stale since can't be reproduced, feel free to reopen if you encounter the issue again.

@bee344 bee344 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support Issue
Projects
None yet
Development

No branches or pull requests

3 participants