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

TypeError: Network request failed #3

Open
billyjacoby opened this issue Dec 22, 2021 · 2 comments
Open

TypeError: Network request failed #3

billyjacoby opened this issue Dec 22, 2021 · 2 comments

Comments

@billyjacoby
Copy link

billyjacoby commented Dec 22, 2021

I've been trying to get this working for hours now but I keep running into one issue after another.

What is the recommended way to install fetch globally so that this package works? It seems that

import {fetch as fetchPolyfill} from 'whatwg-fetch';
global.fetch = fetchPolyfill;

in my index.js file is the only thing that works, which then gives me a Require cycle: error that can't be dismissed..

Even after I do this when I copy and paste the code from the example i just get a TypeError: Network request failed error.

Unfortunately there isn't much info in the logs to tell me whats going on here.

I'm happy to provide any other info to get this figured out!

@billyjacoby
Copy link
Author

billyjacoby commented Dec 22, 2021

It seems that this was an error with the provider being passed a different connection.

Now I'm getting a different error though:

Error: Token mint does not exist in token-mints.json
Screen Shot 2021-12-22 at 6 11 45 PM

When logging the jupiter variable to the console it says 'INITIALIZE_ERROR'

@billyjacoby
Copy link
Author

If I change to mainnet-beta instead of devnet i get a different error still:

TypeError: Cannot read properties of undefined (reading 'SWAP_PROGRAM_ID')

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

1 participant