GitHub でこのプロジェクトをフォークし、dash.cloudflare.com にログインして Pages にアクセスします。
node:buffer のバグのため、デフォルトの "Build command" は使用しないでください。代わりに、以下のコマンドを使用してください:
npx @cloudflare/next-on-pages --experimental-minify
"Build output directory" はデフォルト値を使用し、変更しない。
"Root Directory" を変更しない。
"Environment variables" は、">" をクリックし、"Add variable" をクリックします。そして以下の情報を入力します:
NODE_VERSION=20.1NEXT_TELEMETRY_DISABLE=1OPENAI_API_KEY=your_own_API_keyYARN_VERSION=1.22.19PHP_VERSION=7.4必要に応じて、以下の項目を入力してください:
CODE= Optional, access passwords, multiple passwords can be separated by commasOPENAI_ORG_ID= Optional, specify the organization ID in OpenAIHIDE_USER_API_KEY=1 Optional, do not allow users to enter their own API keyDISABLE_GPT4=1 Optional, do not allow users to use GPT-4"Save and Deploy" をクリックする。
互換性フラグを記入する必要があるため、"Cancel deployment" をクリックする。
"Build settings" の "Functions" から "Compatibility flags" を見つける。
"Configure Production compatibility flag" と "Configure Preview compatibility flag" の両方に "nodejs_compat "を記入する。
"Deployments" に移動し、"Retry deployment" をクリックします。
お楽しみください。