Search code examples
node.jsnext.jsvercelplaywright

Updating NextJS/playwrights nodejs version?


My build on Vercel has started failing due to Playwright's depreciated Node.js version:

Error: Node.js version 12.x is deprecated. Deployments created on or after 2022-08-09 will fail to build. Please set Node.js Version to 16.x in your Project Settings to use Node.js 16. This change is the result of a decision made by an upstream infrastructure provider (AWS).

Followed by:

error playwright@1.22.1: The engine "node" is incompatible with this module. Expected version ">=14". Got "12.22.9" error Found incompatible module.

Is there a way to update Playwright's built in Node.js version?


Solution

  • The issue is that your project in Vercel is setup for Node.js 12 when building the app, which fails due to Playwright requiring Node >=14.

    You can increase the Node.js version in your Vercel project under the Node.js Version section on the General page of the Project Settings.

    See Node.js Version in Vercel for more details.