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

No matching export in "node_modules/@ledgerhq/errors/lib-es/index.js" for import "TransportRaceCondition" #3

Open
gameuser1982 opened this issue May 18, 2024 · 11 comments

Comments

@gameuser1982
Copy link

I am getting the following error with the frontend when I run using yarn dev:

✘ [ERROR] No matching export in "node_modules/@ledgerhq/errors/lib-es/index.js" for import "TransportRaceCondition"

    node_modules/@ledgerhq/hw-transport/lib-es/Transport.js:74:9:
      74 │ import { TransportRaceCondition, TransportError, StatusCodes, getAltStatusM...
         ╵          ~~~~~~~~~~~~~~~~~~~~~~

The fix listed below here doesn't work for yarn:

anza-xyz/wallet-adapter#949

Someone suggested an alternative fix that I will try:

Goto: node_modules/@ledgerhq/hw-transport/node_modules/@ledgerhq/errors/lib-es/index.js

Add line:

export const TransportRaceCondition = createCustomErrorClass("TransportPendingOperation");

This is an open issue for a few weeks, I wonder why nobody else experienced this? I didn't notice this issue in the tutorial video either. I appreciate what you are doing for us Mr Raza!

@gameuser1982
Copy link
Author

gameuser1982 commented May 18, 2024

Hmmm well I added export const TransportRaceCondition = createCustomErrorClass("TransportPendingOperation"); and now when I do yarn dev it starts without compile errors.

I can connect my phantom wallet and it correctly reads the address. It also correctly reads the value of the count in the solana on chain program. But when I click the increment button, nothing happens.

Here is what my dev tools console shows when I click increment:

Error: Invalid arguments: counter not provided.
    at @coral-xyz_anchor.js?v=e1e0dfac:6471:15
    at Array.forEach (<anonymous>)
    at validateAccounts (@coral-xyz_anchor.js?v=e1e0dfac:6466:14)
    at ix (@coral-xyz_anchor.js?v=e1e0dfac:10061:7)
    at MethodsBuilder.txFn [as _txFn] (@coral-xyz_anchor.js?v=e1e0dfac:10123:14)
    at MethodsBuilder.transaction (@coral-xyz_anchor.js?v=e1e0dfac:11240:17)
    at async onClick (increment-button.tsx:17:27)

Also for some reason my background is white not gray like in Mr Raza @AlmostEfficient tutorial video

@gameuser1982
Copy link
Author

gameuser1982 commented May 19, 2024

I redeployed my smart contract and all is good. You are a rock star @AlmostEfficient ! Thank you again for your amazing videos!

@keolamation
Copy link

I reployed my smart contract and all is good. You are a rock star @AlmostEfficient ! Thank you again for your amazing videos!

can you like, please source what he did that helped you fix this A LOT of people are having this same error and 6 hours later I still can't fix it.

@gameuser1982
Copy link
Author

gameuser1982 commented May 19, 2024

@keolamation

I got you.

Goto: node_modules/@ledgerhq/errors/lib-es/index.js

Add line:

export const TransportRaceCondition = createCustomErrorClass("TransportPendingOperation");

Done

@keolamation
Copy link

keolamation commented May 19, 2024 via email

@keolamation
Copy link

@keolamation

I got you.

Goto: node_modules/@ledgerhq/errors/lib-es/index.js

Add line:

export const TransportRaceCondition = createCustomErrorClass("TransportPendingOperation");

Done

also, people keep saying this break on production, I'm making a website ready widget, so I NEED it to not randomly break when customers are trying to connect wallet and buy a token fml. So many issues with solana development dawg.. lol

@gameuser1982
Copy link
Author

gameuser1982 commented May 20, 2024

So many issues with solana development dawg.. lol

For fucking real! I am not sure about your production concerns, but that obviously makes me concerned too. I will be dealing with mainnet deployment soon too. Is there a discord anywhere where we can all like collaborate and try to figure this out?

Because like for real the Solana documentation is sloppy and so is the maintenance of critical repos. Volunteers like @AlmostEfficient are doing an awesome job picking up the slack, but it's ridiculous how badly maintained critical software is for such a financially successful blockchain.

@gameuser1982 gameuser1982 reopened this May 20, 2024
@AlmostEfficient
Copy link
Owner

Broskis if you're making a token swap page use the Jupiter terminal embed instead, it's much less work and won't break in prod

https://station.jup.ag/docs/jupiter-terminal/jupiter-terminal

I wish I could be of more help here but I'm currently on vacation without my computer.

@gameuser1982
Copy link
Author

Broskis if you're making a token swap page use the Jupiter terminal embed instead, it's much less work and won't break in prod

https://station.jup.ag/docs/jupiter-terminal/jupiter-terminal

I wish I could be of more help here but I'm currently on vacation without my computer.

@AlmostEfficient no worries man! Enjoy your vacation!

@keolamation
Copy link

Broskis if you're making a token swap page use the Jupiter terminal embed instead, it's much less work and won't break in prod

https://station.jup.ag/docs/jupiter-terminal/jupiter-terminal

I wish I could be of more help here but I'm currently on vacation without my computer.

I'm making a ICO widget. not a token swapper.

@coredomain
Copy link

I am getting the following error with the frontend when I run using yarn dev:

✘ [ERROR] No matching export in "node_modules/@ledgerhq/errors/lib-es/index.js" for import "TransportRaceCondition"

    node_modules/@ledgerhq/hw-transport/lib-es/Transport.js:74:9:
      74 │ import { TransportRaceCondition, TransportError, StatusCodes, getAltStatusM...
         ╵          ~~~~~~~~~~~~~~~~~~~~~~

The fix listed below here doesn't work for yarn:

anza-xyz/wallet-adapter#949

Someone suggested an alternative fix that I will try:

Goto: node_modules/@ledgerhq/hw-transport/node_modules/@ledgerhq/errors/lib-es/index.js

Add line:

export const TransportRaceCondition = createCustomErrorClass("TransportPendingOperation");

This is an open issue for a few weeks, I wonder why nobody else experienced this? I didn't notice this issue in the tutorial video either. I appreciate what you are doing for us Mr Raza!

This will fix your development environment but break your application when you build for other environments. If compatible, you can try package override with a previous version. Nevertheless, I suggest setting up a local npm repository now that your @LedgerHQ package uses the code with the fix and later updating your local npm repo as necessary. However, this is a symptom of a major problem with the Solana dev ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants