CTA v7.26.0 is giving "fetch is not a function" error
I have a boilerplate create t3 app@latest and installed 1 package the monday-sdk-js package.
It works fine with [email protected] (nextjs 13) but is throwing an error on [email protected] (next14). Next13 has to have the experimental server action flag and next14 does not. Same code on both boilerplates but on next14 I am now getting error:
Any idea why this is happening?
4 Replies
I am still struggling with this.
Can you check if this also happens with a vanilla create-next-app?
it does. Also spinning up a ct3app and downgrading the next version to 13.4 fixes the issue. It is something to do with next between 13.4 and 14.x. I believe has something to do with no longer needing the serverAction experimental flag, or the fact that nextjs14 no longer polyfills node-fetch.
i have searched for a few days, on nextjs and monday-sdk-js githubs, opened a few issues and discussions. No one has responded.
Solution
@cje
Found the answer. I had to modify next.config: