Home
Support Forums

Does Netlify Support Next.js v12?

With the official release of Next.js v12 yesterday, does Netlify support Next.js 12? My understanding is that there is a “v4” of the Next.js plugin, but it’s not clear to me if this will support Next.js v12, or if the current v3 already supports Next.js v12.

We can of course test it out ourselves, but there are many features and some things may break in a bigger production app compared to a small test app. Especially notable is the deprecation of target: serverless in next.config.js, Netlify states to do this in Next.js on Netlify | Netlify Docs

Thanks!

I have deployed my application using v12 as of this morning (Oct 27, 2021) and it did work.
HOWEVER, it does state:

10:42:50 AM: Using Next.js 12.0.1
10:42:50 AM: Warning: support for Next.js >=11.1.0 is experimental

I would strongly recommend testing this in a staging environment to verify.

Deploments fail for me.

1:51:03 PM: ────────────────────────────────────────────────────────────────
1:51:03 PM: Dependencies installation error
1:51:03 PM: ────────────────────────────────────────────────────────────────
1:51:03 PM: ​
1:51:03 PM: Error message
1:51:03 PM: A Netlify Function failed to require one of its dependencies.
1:51:03 PM: Please make sure it is present in the site’s top-level “package.json”.

1:51:03 PM: In file “/opt/build/repo/.netlify/functions-internal/next_404/next_404.js”
1:51:03 PM: Cannot find module ‘@webassemblyjs/helper-module-context’
1:51:03 PM: Require stack:
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/traverse.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/esbuild/src_files.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/esbuild/index.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/index.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/index.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/index.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/main.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins_core/functions/index.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/steps/get.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/core/main.js
1:51:03 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/core/bin.js
1:51:03 PM: ​
1:51:03 PM: Resolved config
1:51:03 PM: build:

Hi all,

Posted by @cassidoo on the Netlify Blog yesterday