I'm super confused I get this error on a Next.js app (latest) server-side:
Something went wrong TypeError: Only absolute URLs are supported
builder:dev: at getNodeRequestOptions (webpack-internal:///../../node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js:1328:9)
builder:dev: ... 8 lines matching cause stack trace ...
builder:dev: at async Ky._retry (webpack-internal:///(api)/../../node_modules/.pnpm/ky@1.2.3/node_modules/ky/distribution/core/Ky.js:227:20)
@mistralai/mistralai package was mistakenly imported on the client side which was overwriting the fetch definition. Which subsequently broke ky behavior.
I'm super confused I get this error on a Next.js app (latest) server-side:
It seems it calls node-fetch library. My Node.js version is
v20.8.1
Maybe an issue when webpack transpiles the code?