Cannot find module 'fs/promises'

ERROR	Error: Cannot find module 'fs/promises'

原因

Promise API は Node.js v14.x から使えるが、ビルド時に v12.x が使われていた。

解決方法

Project Settings ページの Node.js Version セクションで 14.x 以上を選択する。

Node.js Version

Whenever a new Project is created, the latest Node.js LTS version available on Vercel at that time is selected for it.

This selection will be reflected within the Node.js Version section on the General page of the Project Settings. If needed, you can also customize it there:

Currently, the following Node.js versions are available:

新しいプロジェクトを作成すると、その時点で Vercel で利用可能な最新の Node.js LTS バージョンがそのプロジェクトに選択されます。

この選択は、Project Settings の一般ページの Node.js Version セクションに反映されます。必要であれば、そこでカスタマイズすることも可能です。

現在、以下の Node.js バージョンが利用可能です。