We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have the following error when using a Next.js new app router API route.
TypeError: fetch is not a function (same error for each provider)
Here is my code (/ap/crypto-convert/route.ts)
import { NextResponse } from 'next/server'; import CryptoConvert from 'crypto-convert'; const convert = new CryptoConvert({ cryptoInterval: 60 * 1e3 * 60, //Crypto prices update interval (every 1 hour) fiatInterval: 60 * 1e3 * 60, //Fiat prices update interval (every 1 hour) }); export async function GET() { await convert.ready(); const currencyConversions = convert.USDC.USD(1) return NextResponse.json(currencyConversions, { status: 200 }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have the following error when using a Next.js new app router API route.
TypeError: fetch is not a function (same error for each provider)
Here is my code (/ap/crypto-convert/route.ts)
The text was updated successfully, but these errors were encountered: