8

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?

juliomalves
  • 42,130
  • 20
  • 150
  • 146
meds
  • 21,699
  • 37
  • 163
  • 314
  • 1
    The issue is that your project is running a version below 14 when building the app in Vercel. Have you tried bumping Node.js to 14.x in your Vercel project settings? – juliomalves May 21 '22 at 11:22
  • 1
    @juliomalves yep the setting was actually in vercel as you said, if you post this as an answer I'm happy to ✅ it – meds May 25 '22 at 07:49

1 Answers1

11

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.

juliomalves
  • 42,130
  • 20
  • 150
  • 146