cloudflare / next-on-pages

CLI to build and develop Next.js apps for Cloudflare Pages
https://www.npmjs.com/package/@cloudflare/next-on-pages
MIT License
1.28k stars 125 forks source link

[🐛 Bug]: nextjs-chatgpt-app error - functions were not configured to run with the Edge Runtime: publish.func #166

Closed centminmod closed 1 year ago

centminmod commented 1 year ago

Cli version

@cloudflare/next-on-pages CLI v.0.7.0

Next.js related information

No response

Vercel version

Vercel CLI 28.18.4

Description

Hi I am new to nextjs and Cloudflare Pages usage and my first experience was building nextjs-chatgpt-app at https://github.com/enricoros/nextjs-chatgpt-app but last few builds haven't been successful and not sure if the issue is on either side? I also logged the error at https://github.com/enricoros/nextjs-chatgpt-app/issues/72

the latest build log

2023-04-10T20:35:03.406249Z Cloning repository...
2023-04-10T20:35:04.457902Z From https://github.com/centminmod/nextjs-chatgpt-app
2023-04-10T20:35:04.458485Z  * branch            55490d94400b1e37e11cdf60bd815855f6f5fa35 -> FETCH_HEAD
2023-04-10T20:35:04.458693Z 
2023-04-10T20:35:04.53874Z  HEAD is now at 55490d9 Merge pull request #6 from enricoros/main
2023-04-10T20:35:04.539321Z 
2023-04-10T20:35:04.690934Z 
2023-04-10T20:35:04.719923Z Success: Finished cloning repository files
2023-04-10T20:35:05.439401Z Installing dependencies
2023-04-10T20:35:05.451549Z Python version set to 3.7
2023-04-10T20:35:09.020809Z Downloading and installing node v17.9.1...
2023-04-10T20:35:09.48411Z  Downloading https://nodejs.org/dist/v17.9.1/node-v17.9.1-linux-x64.tar.xz...
2023-04-10T20:35:09.959881Z Computing checksum with sha256sum
2023-04-10T20:35:10.093419Z Checksums matched!
2023-04-10T20:35:15.568211Z Now using node v17.9.1 (npm v8.11.0)
2023-04-10T20:35:16.013016Z Started restoring cached build plugins
2023-04-10T20:35:16.02841Z  Finished restoring cached build plugins
2023-04-10T20:35:16.599466Z Attempting ruby version 2.7.1, read from environment
2023-04-10T20:35:20.725307Z Using ruby version 2.7.1
2023-04-10T20:35:21.107559Z Using PHP version 7.4
2023-04-10T20:35:21.295519Z 5.2 is already installed.
2023-04-10T20:35:21.33234Z  Using Swift version 5.2
2023-04-10T20:35:21.332683Z Started restoring cached node modules
2023-04-10T20:35:21.352198Z Finished restoring cached node modules
2023-04-10T20:35:21.88703Z  Installing NPM modules using NPM version 8.11.0
2023-04-10T20:35:22.325557Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:35:22.325971Z npm WARN config location in the cache, and they are managed by
2023-04-10T20:35:22.326204Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:35:22.752397Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:35:22.752752Z npm WARN config location in the cache, and they are managed by
2023-04-10T20:35:22.752967Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:35:52.996027Z 
2023-04-10T20:35:52.996544Z added 492 packages, and audited 493 packages in 30s
2023-04-10T20:35:52.996878Z 
2023-04-10T20:35:52.997015Z 190 packages are looking for funding
2023-04-10T20:35:52.997191Z   run `npm fund` for details
2023-04-10T20:35:52.998011Z 
2023-04-10T20:35:52.998344Z found 0 vulnerabilities
2023-04-10T20:35:53.022133Z NPM modules installed
2023-04-10T20:35:53.630503Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:35:53.630884Z npm WARN config location in the cache, and they are managed by
2023-04-10T20:35:53.631045Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:35:53.650957Z Installing Hugo 0.54.0
2023-04-10T20:35:54.39425Z  Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-04-10T20:35:54.398608Z Started restoring cached go cache
2023-04-10T20:35:54.421814Z Finished restoring cached go cache
2023-04-10T20:35:54.422479Z Installing Go version 1.16
2023-04-10T20:36:01.781548Z 
2023-04-10T20:36:01.799973Z unset GOOS;
2023-04-10T20:36:01.816322Z unset GOARCH;
2023-04-10T20:36:01.816682Z export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.16.linux.amd64';
2023-04-10T20:36:01.816839Z export PATH="/opt/buildhome/.gimme_cache/versions/go1.16.linux.amd64/bin:${PATH}";
2023-04-10T20:36:01.816973Z go version >&2;
2023-04-10T20:36:01.817103Z 
2023-04-10T20:36:01.824689Z export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.16.linux.amd64.env"
2023-04-10T20:36:01.840086Z go version go1.16 linux/amd64
2023-04-10T20:36:01.843409Z Installing missing commands
2023-04-10T20:36:01.843728Z Verify run directory
2023-04-10T20:36:01.843886Z Executing user command: npx @cloudflare/next-on-pages --experimental-minify
2023-04-10T20:36:02.393976Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:36:02.394349Z npm WARN config location in the cache, and they are managed by
2023-04-10T20:36:02.394536Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:36:03.170275Z npm WARN exec The following package was not found and will be installed: @cloudflare/next-on-pages
2023-04-10T20:36:18.661275Z npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-04-10T20:36:18.906147Z npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2023-04-10T20:36:20.021224Z npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
2023-04-10T20:36:28.384424Z ⚡️ @cloudflare/next-on-pages CLI v.0.7.0
2023-04-10T20:36:28.387815Z ⚡️ Detected Package Manager: npm
2023-04-10T20:36:28.388148Z ⚡️ Preparing project...
2023-04-10T20:36:28.390751Z ⚡️ Project is ready
2023-04-10T20:36:28.391074Z ⚡️ Building project...
2023-04-10T20:36:28.922842Z ▲ npm
2023-04-10T20:36:28.923697Z ▲ WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:36:28.923938Z ▲ npm WARN config location in the cache, and they are managed by
2023-04-10T20:36:28.924418Z ▲ npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:36:29.553869Z ▲ npm
2023-04-10T20:36:29.555139Z ▲ WARN
2023-04-10T20:36:29.555475Z ▲ exec The following package was not found and will be installed: vercel
2023-04-10T20:36:37.448486Z ▲ npm
2023-04-10T20:36:37.449303Z ▲ WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
2023-04-10T20:36:37.754495Z ▲ npm
2023-04-10T20:36:37.755212Z ▲ WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-04-10T20:36:37.927547Z ▲ npm WARN
2023-04-10T20:36:37.928319Z ▲ deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2023-04-10T20:36:42.443277Z ▲ Vercel CLI 28.18.4
2023-04-10T20:36:42.743983Z ▲ Installing dependencies...
2023-04-10T20:36:43.279598Z ▲ npm
2023-04-10T20:36:43.28181Z  ▲ WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:36:43.282089Z ▲ npm WARN
2023-04-10T20:36:43.28225Z  ▲ config location in the cache, and they are managed by
2023-04-10T20:36:43.283517Z ▲ npm
2023-04-10T20:36:43.28408Z  ▲ WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:36:44.027631Z ▲ up to date in 781ms
2023-04-10T20:36:44.027966Z ▲ 190 packages are looking for funding
2023-04-10T20:36:44.028117Z ▲ run `npm fund` for details
2023-04-10T20:36:44.042099Z ▲ Detected Next.js version: 13.3.0
2023-04-10T20:36:44.047824Z ▲ Detected `package-lock.json` generated by npm 7+...
2023-04-10T20:36:44.048325Z ▲ Running "npm run build"
2023-04-10T20:36:44.579013Z ▲ npm
2023-04-10T20:36:44.579513Z ▲ WARN
2023-04-10T20:36:44.579741Z ▲ config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T20:36:44.579891Z ▲ npm WARN
2023-04-10T20:36:44.580746Z ▲ config location in the cache, and they are managed by
2023-04-10T20:36:44.580927Z ▲ npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T20:36:44.59778Z  ▲ > nextjs-chatgpt-app@0.2.0 build
2023-04-10T20:36:44.59808Z  ▲ > next build
2023-04-10T20:36:45.367027Z ▲ info  - Linting and checking validity of types...
2023-04-10T20:36:54.264867Z ▲ info  - Creating an optimized production build...
2023-04-10T20:37:09.793129Z ▲ info  - Compiled successfully
2023-04-10T20:37:09.794446Z ▲ info  - Collecting page data...
2023-04-10T20:37:27.991351Z ▲ info  - Generating static pages (0/3)
2023-04-10T20:37:29.28514Z  ▲ info  - Generating static pages (3/3)
2023-04-10T20:37:29.306185Z ▲ info  - Finalizing page optimization...
2023-04-10T20:37:29.314557Z ▲ 
2023-04-10T20:37:29.325967Z ▲ Route (pages)                              Size     First Load JS
2023-04-10T20:37:29.326329Z ▲ ┌ ○ /                                      152 kB          251 kB
2023-04-10T20:37:29.327051Z ▲ ├   └ css/86ad80c02bda2636.css             648 B
2023-04-10T20:37:29.32727Z  ▲ ├   /_app                                  0 B            99.5 kB
2023-04-10T20:37:29.327407Z ▲ ├ ○ /404                                   182 B          99.7 kB
2023-04-10T20:37:29.327538Z ▲ ├ ℇ /api/openai/models                     0 B            99.5 kB
2023-04-10T20:37:29.327755Z ▲ ├ ℇ /api/openai/stream-chat                0 B            99.5 kB
2023-04-10T20:37:29.328423Z ▲ └ λ /api/publish                           0 B            99.5 kB
2023-04-10T20:37:29.328599Z ▲ + First Load JS shared by all              105 kB
2023-04-10T20:37:29.328829Z ▲ ├ chunks/framework-2c79e2a64abdb08b.js   45.2 kB
2023-04-10T20:37:29.328963Z ▲ ├ chunks/main-4dcb7f9b52833aba.js        27.2 kB
2023-04-10T20:37:29.329134Z ▲ ├ chunks/pages/_app-02967b3b3aa6bbc9.js  24.7 kB
2023-04-10T20:37:29.329886Z ▲ ├ chunks/webpack-62a659d736ca0b7b.js     2.44 kB
2023-04-10T20:37:29.330201Z ▲ └ css/a90f819cc1334814.css               5.27 kB
2023-04-10T20:37:29.330498Z ▲ ℇ  (Streaming)  server-side renders with streaming (uses React 18 SSR streaming or Server Components)
2023-04-10T20:37:29.33065Z  ▲ λ  (Server)     server-side renders at runtime (uses getInitialProps or getServerSideProps)
2023-04-10T20:37:29.330929Z ▲ ○  (Static)     automatically rendered as static HTML (uses no initial props)
2023-04-10T20:37:34.300737Z ▲ Traced Next.js server files in: 4.880s
2023-04-10T20:37:35.313452Z ▲ Created all serverless functions in: 1.011s
2023-04-10T20:37:35.417118Z ▲ Collected static files (public/, static/, .next/static): 17.165ms
2023-04-10T20:37:37.116821Z ▲ Build Completed in .vercel/output [54s]
2023-04-10T20:37:37.255785Z ⚡️ Building Completed.
2023-04-10T20:37:37.441196Z ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
2023-04-10T20:37:37.441468Z ⚡️ 
2023-04-10T20:37:37.441633Z ⚡️ The following functions were not configured to run with the Edge Runtime:
2023-04-10T20:37:37.441762Z ⚡️  - publish.func
2023-04-10T20:37:37.441884Z ⚡️ 
2023-04-10T20:37:37.442006Z ⚡️ If this is a Next.js project:
2023-04-10T20:37:37.44212Z  ⚡️ 
2023-04-10T20:37:37.442234Z ⚡️ - you can read more about configuring Edge API Routes here: https://nextjs.org/docs/api-routes/edge-api-route
2023-04-10T20:37:37.442356Z ⚡️ 
2023-04-10T20:37:37.442469Z ⚡️ - you can try enabling the Edge Runtime for a specific page by exporting the following from your page:
2023-04-10T20:37:37.44261Z  ⚡️ 
2023-04-10T20:37:37.442723Z ⚡️         export const config = { runtime: 'edge' };
2023-04-10T20:37:37.442841Z ⚡️ 
2023-04-10T20:37:37.443Z    ⚡️ - or you can try enabling the Edge Runtime for all pages in your project by adding the following to your 'next.config.js' file:
2023-04-10T20:37:37.443143Z ⚡️ 
2023-04-10T20:37:37.443333Z ⚡️         const nextConfig = { experimental: { runtime: 'edge'} };
2023-04-10T20:37:37.443485Z ⚡️ 
2023-04-10T20:37:37.443633Z ⚡️ You can read more about the Edge Runtime here: https://nextjs.org/docs/advanced-features/react-18/switchable-runtime
2023-04-10T20:37:37.47741Z  Failed: build command exited with code: 1
2023-04-10T20:37:38.454676Z Failed: error occurred while running build command

Reproduction

The Github repo built against was https://github.com/centminmod/nextjs-chatgpt-app.

The basics of Cloudflare Pages steps for building the app that worked previously was as follows:

For setting up your nextjs app on Cloudflare Pages you can follow Cloudflare developer docs at https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/ and https://developers.cloudflare.com/pages/platform/build-configuration/

The only difference is I took these steps below:

  1. I forked your repo to my own Github repo
  2. On the Cloudflare Pages section, click Create a project button > Connect To Git and give Cloudflare Pages either All Github account Repo access or selected Repo access. I use selected Repo access and select the forked repo from step 1
  3. Once you select the forked Github repo, you click Begin Setup button to setup build and deployments. On this page you set you Project name, Production branch i.e. main and your Build settings where you select from Framework preset dropdown menu Next.js. Leave the preset filled Build command and Build output directory as preset defaults. You'd want to set Environmental variables (advanced) on this page to configure some variables as follows:
VARIABLE VALUE
GO_VERSION 1.16
NEXT_TELEMETRY_DISABLED 1
NODE_VERSION 17
PHP_VERSION 7.4
PYTHON_VERSION 3.7
RUBY_VERSION 2.7.1
  1. Click the Save and Deploy button
  2. Then watch the process run to initialize your build environment, clone Github repo, build the application and deploy to Cloudflare Network once that is done, proceed to the project you created.
  3. Custom domains tab allows you to set up your domain via CNAME
  4. Settings page will have 2 settings you want to enable, Access Policy to restrict preview deployments to members of your Cloudflare account via one time pin and to restrict primary *.YOURPROJECT.pages.dev domain see https://developers.cloudflare.com/pages/platform/known-issues/#enabling-access-on-your-pagesdev-domain and enable Web Analytics

Additional Information

No response

Would you like to help?

centminmod commented 1 year ago

Not sure what this means but related to https://github.com/cloudflare/next-on-pages#2-configure-the-application-to-use-the-edge-runtime ?

In order for your application to run on Cloudflare Pages, it needs to be set to use the Edge Runtime. Make sure that all the files in your application containing server-side code (e.g. any API Routes and any pages which use getServerSideProps) export a config object specifying the use of the Edge Runtime:

export const config = {
    runtime: 'edge',
};

Additionally, ensure that your application is not using any unsupported APIs and that its API routes are defined as Edge API Routes.

so i need to change your next.conf.js from

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  env: {
    // defaults to TRUE, unless API Keys are set at build time; this flag is used by the UI
    REQUIRE_USER_API_KEYS: !process.env.OPENAI_API_KEY,
  },
  webpack(config, { isServer, dev }) {
    // @mui/joy: anything material gets redirected to Joy
    config.resolve.alias['@mui/material'] = '@mui/joy';

    // @dqbd/tiktoken: enable asynchronous WebAssembly
    config.experiments = {
      asyncWebAssembly: true,
      layers: true,
    };

    return config;
  },
};

module.exports = nextConfig;

to

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  env: {
    // defaults to TRUE, unless API Keys are set at build time; this flag is used by the UI
    REQUIRE_USER_API_KEYS: !process.env.OPENAI_API_KEY,
  },
  experimental: {
    runtime: 'edge',
  },
  webpack(config, { isServer, dev }) {
    // @mui/joy: anything material gets redirected to Joy
    config.resolve.alias['@mui/material'] = '@mui/joy';

    // @dqbd/tiktoken: enable asynchronous WebAssembly
    config.experiments = {
      asyncWebAssembly: true,
      layers: true,
    };

    return config;
  },
};

module.exports = nextConfig;

?

However, tried the change but now get

2023-04-10T21:33:56.784279Z Cloning repository...
2023-04-10T21:33:57.847026Z From https://github.com/centminmod/nextjs-chatgpt-app
2023-04-10T21:33:57.847807Z  * branch            b20eac9b8cb8eb1415958962eed68713538a0a48 -> FETCH_HEAD
2023-04-10T21:33:57.848011Z 
2023-04-10T21:33:57.944992Z HEAD is now at b20eac9 Merge branch 'main' of https://github.com/centminmod/nextjs-chatgpt-app into main
2023-04-10T21:33:57.945881Z 
2023-04-10T21:33:58.110599Z 
2023-04-10T21:33:58.149495Z Success: Finished cloning repository files
2023-04-10T21:33:58.843183Z Installing dependencies
2023-04-10T21:33:58.855202Z Python version set to 3.7
2023-04-10T21:34:03.071733Z Downloading and installing node v17.9.1...
2023-04-10T21:34:03.45893Z  Downloading https://nodejs.org/dist/v17.9.1/node-v17.9.1-linux-x64.tar.xz...
2023-04-10T21:34:03.805781Z Computing checksum with sha256sum
2023-04-10T21:34:03.943642Z Checksums matched!
2023-04-10T21:34:09.266518Z Now using node v17.9.1 (npm v8.11.0)
2023-04-10T21:34:09.718374Z Started restoring cached build plugins
2023-04-10T21:34:09.73571Z  Finished restoring cached build plugins
2023-04-10T21:34:10.335758Z Attempting ruby version 2.7.1, read from environment
2023-04-10T21:34:12.62803Z  Using /opt/buildhome/.rvm/gems/ruby-2.7.1
2023-04-10T21:34:13.776276Z Using PHP version 7.4
2023-04-10T21:34:13.942536Z 5.2.5 is already installed.
2023-04-10T21:34:13.972997Z Using Swift version 5.2.5
2023-04-10T21:34:13.974212Z Started restoring cached node modules
2023-04-10T21:34:13.992008Z Finished restoring cached node modules
2023-04-10T21:34:14.516113Z Installing NPM modules using NPM version 8.11.0
2023-04-10T21:34:15.862011Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T21:34:15.862336Z npm WARN config location in the cache, and they are managed by
2023-04-10T21:34:15.862693Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T21:34:16.284771Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T21:34:16.286337Z npm WARN config location in the cache, and they are managed by
2023-04-10T21:34:16.286579Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T21:34:44.80024Z  
2023-04-10T21:34:44.800689Z added 492 packages, and audited 493 packages in 29s
2023-04-10T21:34:44.800889Z 
2023-04-10T21:34:44.80103Z  190 packages are looking for funding
2023-04-10T21:34:44.801162Z   run `npm fund` for details
2023-04-10T21:34:44.802408Z 
2023-04-10T21:34:44.802702Z found 0 vulnerabilities
2023-04-10T21:34:44.822912Z NPM modules installed
2023-04-10T21:34:44.895553Z Installing Hugo 0.54.0
2023-04-10T21:34:45.627524Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-04-10T21:34:45.630471Z Started restoring cached go cache
2023-04-10T21:34:45.654418Z Finished restoring cached go cache
2023-04-10T21:34:45.654845Z Installing Go version 1.16
2023-04-10T21:34:55.055448Z 
2023-04-10T21:34:55.076626Z unset GOOS;
2023-04-10T21:34:55.09123Z  unset GOARCH;
2023-04-10T21:34:55.091596Z export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.16.linux.amd64';
2023-04-10T21:34:55.091802Z export PATH="/opt/buildhome/.gimme_cache/versions/go1.16.linux.amd64/bin:${PATH}";
2023-04-10T21:34:55.091979Z go version >&2;
2023-04-10T21:34:55.092112Z 
2023-04-10T21:34:55.097479Z export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.16.linux.amd64.env"
2023-04-10T21:34:55.112152Z go version go1.16 linux/amd64
2023-04-10T21:34:55.116436Z Installing missing commands
2023-04-10T21:34:55.116936Z Verify run directory
2023-04-10T21:34:55.117162Z Executing user command: npx @cloudflare/next-on-pages --experimental-minify
2023-04-10T21:34:55.651986Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T21:34:55.652351Z npm WARN config location in the cache, and they are managed by
2023-04-10T21:34:55.652559Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T21:34:56.304086Z npm WARN exec The following package was not found and will be installed: @cloudflare/next-on-pages
2023-04-10T21:35:11.686289Z npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-04-10T21:35:11.855309Z npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2023-04-10T21:35:13.147367Z npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
2023-04-10T21:35:21.017507Z ⚡️ @cloudflare/next-on-pages CLI v.0.7.0
2023-04-10T21:35:21.020316Z ⚡️ Detected Package Manager: npm
2023-04-10T21:35:21.020625Z ⚡️ Preparing project...
2023-04-10T21:35:21.022775Z ⚡️ Project is ready
2023-04-10T21:35:21.023078Z ⚡️ Building project...
2023-04-10T21:35:21.541689Z ▲ npm
2023-04-10T21:35:21.542899Z ▲ WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T21:35:21.543185Z ▲ npm WARN config location in the cache, and they are managed by
2023-04-10T21:35:21.543333Z ▲ npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T21:35:22.209757Z ▲ npm
2023-04-10T21:35:22.210184Z ▲ WARN
2023-04-10T21:35:22.210786Z ▲ exec The following package was not found and will be installed: vercel
2023-04-10T21:35:29.897466Z ▲ npm WARN
2023-04-10T21:35:29.89813Z  ▲ deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
2023-04-10T21:35:30.207596Z ▲ npm
2023-04-10T21:35:30.208113Z ▲ WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-04-10T21:35:30.415705Z ▲ npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2023-04-10T21:35:34.908372Z ▲ Vercel CLI 28.18.4
2023-04-10T21:35:35.217036Z ▲ Installing dependencies...
2023-04-10T21:35:35.737856Z ▲ npm
2023-04-10T21:35:35.739154Z ▲ WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T21:35:35.739548Z ▲ npm WARN
2023-04-10T21:35:35.739825Z ▲ config location in the cache, and they are managed by
2023-04-10T21:35:35.740058Z ▲ npm
2023-04-10T21:35:35.740292Z ▲ WARN config
2023-04-10T21:35:35.740508Z ▲ [`cacache`](http://npm.im/cacache).
2023-04-10T21:35:36.461261Z ▲ up to date in 756ms
2023-04-10T21:35:36.461965Z ▲ 190 packages are looking for funding
2023-04-10T21:35:36.462169Z ▲ run `npm fund` for details
2023-04-10T21:35:36.474291Z ▲ Detected Next.js version: 13.3.0
2023-04-10T21:35:36.479371Z ▲ Detected `package-lock.json` generated by npm 7+...
2023-04-10T21:35:36.479807Z ▲ Running "npm run build"
2023-04-10T21:35:36.994581Z ▲ npm
2023-04-10T21:35:36.995018Z ▲ WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-04-10T21:35:36.995233Z ▲ npm WARN
2023-04-10T21:35:36.995789Z ▲ config location in the cache, and they are managed by
2023-04-10T21:35:36.99618Z  ▲ npm WARN config     [`cacache`](http://npm.im/cacache).
2023-04-10T21:35:37.013202Z ▲ > nextjs-chatgpt-app@0.2.0 build
2023-04-10T21:35:37.013545Z ▲ > next build
2023-04-10T21:35:37.602821Z ▲ warn  - You have enabled experimental feature (runtime) in next.config.js.
2023-04-10T21:35:37.603618Z ▲ warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
2023-04-10T21:35:37.757394Z ▲ info  - Linting and checking validity of types...
2023-04-10T21:35:46.413006Z ▲ info  - Creating an optimized production build...
2023-04-10T21:35:46.889194Z ▲ warn  - You are using `experimental.runtime` which was removed. Check https://nextjs.org/docs/api-routes/edge-api-routes on how to use edge runtime.
2023-04-10T21:36:01.980968Z ▲ Failed to compile.
2023-04-10T21:36:01.981444Z ▲ ./node_modules/multipipe/index.js:7:0
2023-04-10T21:36:01.981618Z ▲ Module not found: Can't resolve 'stream'
2023-04-10T21:36:01.981814Z ▲ 
2023-04-10T21:36:01.981979Z ▲ https://nextjs.org/docs/messages/module-not-found
2023-04-10T21:36:01.982096Z ▲ 
2023-04-10T21:36:01.982206Z ▲ Import trace for requested module:
2023-04-10T21:36:01.982313Z ▲ ./node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.js
2023-04-10T21:36:01.982445Z ▲ ./pages/_document.tsx
2023-04-10T21:36:01.982679Z ▲ ./node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?absolute500Path=&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=private-next-pages%2F_document.tsx&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolutePagePath=private-next-pages%2Findex.tsx&buildId=pACNkUCpKtwjMkmYi7v1Z&dev=false&isServerComponent=false&page=%2F&stringifiedConfig=%7B%22env%22%3A%7B%22REQUIRE_USER_API_KEYS%22%3Atrue%7D%2C%22eslint%22%3A%7B%22ignoreDuringBuilds%22%3Afalse%7D%2C%22typescript%22%3A%7B%22ignoreBuildErrors%22%3Afalse%2C%22tsconfigPath%22%3A%22tsconfig.json%22%7D%2C%22distDir%22%3A%22.next%22%2C%22cleanDistDir%22%3Atrue%2C%22assetPrefix%22%3A%22%22%2C%22configOrigin%22%3A%22next.config.js%22%2C%22useFileSystemPublicRoutes%22%3Atrue%2C%22generateEtags%22%3Atrue%2C%22pageExtensions%22%3A%5B%22tsx%22%2C%22ts%22%2C%22jsx%22%2C%22js%22%5D%2C%22poweredByHeader%22%3Atrue%2C%22compress%22%3Atrue%2C%22analyticsId%22%3A%22%22%2C%22images%22%3A%7B%22deviceSizes%22%3A%5B640%2C750%2C828%2C1080%2C1200%2C1920%2C2048%2C3840%5D%2C%22imageSizes%22%3A%5B16%2C32%2C48%2C64%2C96%2C128%2C256%2C384%5D%2C%22path%22%3A%22%2F_next%2Fimage%22%2C%22loader%22%3A%22default%22%2C%22loaderFile%22%3A%22%22%2C%22domains%22%3A%5B%5D%2C%22disableStaticImages%22%3Afalse%2C%22minimumCacheTTL%22%3A60%2C%22formats%22%3A%5B%22image%2Fwebp%22%5D%2C%22dangerouslyAllowSVG%22%3Afalse%2C%22contentSecurityPolicy%22%3A%22script-src%20'none'%3B%20frame-src%20'none'%3B%20sandbox%3B%22%2C%22contentDispositionType%22%3A%22inline%22%2C%22remotePatterns%22%3A%5B%5D%2C%22unoptimized%22%3Afalse%7D%2C%22devIndicators%22%3A%7B%22buildActivity%22%3Atrue%2C%22buildActivityPosition%22%3A%22bottom-right%22%7D%2C%22onDemandEntries%22%3A%7B%22maxInactiveAge%22%3A15000%2C%22pagesBufferLength%22%3A2%7D%2C%22amp%22%3A%7B%22canonicalBase%22%3A%22%22%7D%2C%22basePath%22%3A%22%22%2C%22sassOptions%22%3A%7B%7D%2C%22trailingSlash%22%3Afalse%2C%22i18n%22%3Anull%2C%22productionBrowserSourceMaps%22%3Afalse%2C%22optimizeFonts%22%3Atrue%2C%22excludeDefaultMomentLocales%22%3Atrue%2C%22serverRuntimeConfig%22%3A%7B%7D%2C%22publicRuntimeConfig%22%3A%7B%7D%2C%22reactStrictMode%22%3Atrue%2C%22httpAgentOptions%22%3A%7B%22keepAlive%22%3Atrue%7D%2C%22outputFileTracing%22%3Atrue%2C%22staticPageGenerationTimeout%22%3A60%2C%22swcMinify%22%3Atrue%2C%22experimental%22%3A%7B%22clientRouterFilter%22%3Afalse%2C%22clientRouterFilterRedirects%22%3Afalse%2C%22fetchCacheKeyPrefix%22%3A%22%22%2C%22middlewarePrefetch%22%3A%22flexible%22%2C%22optimisticClientCache%22%3Atrue%2C%22runtime%22%3A%22edge%22%2C%22manualClientBasePath%22%3Afalse%2C%22legacyBrowsers%22%3Afalse%2C%22newNextLinkBehavior%22%3Atrue%2C%22cpus%22%3A3%2C%22sharedPool%22%3Atrue%2C%22isrFlushToDisk%22%3Atrue%2C%22workerThreads%22%3Afalse%2C%22pageEnv%22%3Afalse%2C%22optimizeCss%22%3Afalse%2C%22nextScriptWorkers%22%3Afalse%2C%22scrollRestoration%22%3Afalse%2C%22externalDir%22%3Afalse%2C%22disableOptimizedLoading%22%3Afalse%2C%22gzipSize%22%3Atrue%2C%22swcFileReading%22%3Atrue%2C%22craCompat%22%3Afalse%2C%22esmExternals%22%3Atrue%2C%22appDir%22%3Afalse%2C%22isrMemoryCacheSize%22%3A52428800%2C%22fullySpecified%22%3Afalse%2C%22outputFileTracingRoot%22%3A%22%2Fopt%2Fbuildhome%2Frepo%22%2C%22swcTraceProfiling%22%3Afalse%2C%22forceSwcTransforms%22%3Afalse%2C%22largePageDataBytes%22%3A128000%2C%22enableUndici%22%3Afalse%2C%22adjustFontFallbacks%22%3Afalse%2C%22adjustFontFallbacksWithSizeAdjust%22%3Afalse%2C%22typedRoutes%22%3Afalse%2C%22instrumentationHook%22%3Afalse%7D%2C%22configFile%22%3A%22%2Fopt%2Fbuildhome%2Frepo%2Fnext.config.js%22%2C%22configFileName%22%3A%22next.config.js%22%7D&pagesType=pages&appDirLoader=&sriEnabled=false&incrementalCacheHandlerPath=!
2023-04-10T21:36:01.9829Z   ▲ 
2023-04-10T21:36:01.983061Z ▲ ./node_modules/readable-stream/lib/_stream_readable.js:43:0
2023-04-10T21:36:01.983207Z ▲ Module not found: Can't resolve 'stream'
2023-04-10T21:36:01.983348Z ▲ 
2023-04-10T21:36:01.98346Z  ▲ https://nextjs.org/docs/messages/module-not-found
2023-04-10T21:36:01.98357Z  ▲ 
2023-04-10T21:36:01.983678Z ▲ Import trace for requested module:
2023-04-10T21:36:01.983785Z ▲ ./node_modules/readable-stream/readable.js
2023-04-10T21:36:01.983912Z ▲ ./node_modules/html-tokenize/index.js
2023-04-10T21:36:01.984026Z ▲ ./node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.js
2023-04-10T21:36:01.984144Z ▲ ./pages/_document.tsx
2023-04-10T21:36:01.984264Z ▲ ./node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?absolute500Path=&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=private-next-pages%2F_document.tsx&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolutePagePath=private-next-pages%2Findex.tsx&buildId=pACNkUCpKtwjMkmYi7v1Z&dev=false&isServerComponent=false&page=%2F&stringifiedConfig=%7B%22env%22%3A%7B%22REQUIRE_USER_API_KEYS%22%3Atrue%7D%2C%22eslint%22%3A%7B%22ignoreDuringBuilds%22%3Afalse%7D%2C%22typescript%22%3A%7B%22ignoreBuildErrors%22%3Afalse%2C%22tsconfigPath%22%3A%22tsconfig.json%22%7D%2C%22distDir%22%3A%22.next%22%2C%22cleanDistDir%22%3Atrue%2C%22assetPrefix%22%3A%22%22%2C%22configOrigin%22%3A%22next.config.js%22%2C%22useFileSystemPublicRoutes%22%3Atrue%2C%22generateEtags%22%3Atrue%2C%22pageExtensions%22%3A%5B%22tsx%22%2C%22ts%22%2C%22jsx%22%2C%22js%22%5D%2C%22poweredByHeader%22%3Atrue%2C%22compress%22%3Atrue%2C%22analyticsId%22%3A%22%22%2C%22images%22%3A%7B%22deviceSizes%22%3A%5B640%2C750%2C828%2C1080%2C1200%2C1920%2C2048%2C3840%5D%2C%22imageSizes%22%3A%5B16%2C32%2C48%2C64%2C96%2C128%2C256%2C384%5D%2C%22path%22%3A%22%2F_next%2Fimage%22%2C%22loader%22%3A%22default%22%2C%22loaderFile%22%3A%22%22%2C%22domains%22%3A%5B%5D%2C%22disableStaticImages%22%3Afalse%2C%22minimumCacheTTL%22%3A60%2C%22formats%22%3A%5B%22image%2Fwebp%22%5D%2C%22dangerouslyAllowSVG%22%3Afalse%2C%22contentSecurityPolicy%22%3A%22script-src%20'none'%3B%20frame-src%20'none'%3B%20sandbox%3B%22%2C%22contentDispositionType%22%3A%22inline%22%2C%22remotePatterns%22%3A%5B%5D%2C%22unoptimized%22%3Afalse%7D%2C%22devIndicators%22%3A%7B%22buildActivity%22%3Atrue%2C%22buildActivityPosition%22%3A%22bottom-right%22%7D%2C%22onDemandEntries%22%3A%7B%22maxInactiveAge%22%3A15000%2C%22pagesBufferLength%22%3A2%7D%2C%22amp%22%3A%7B%22canonicalBase%22%3A%22%22%7D%2C%22basePath%22%3A%22%22%2C%22sassOptions%22%3A%7B%7D%2C%22trailingSlash%22%3Afalse%2C%22i18n%22%3Anull%2C%22productionBrowserSourceMaps%22%3Afalse%2C%22optimizeFonts%22%3Atrue%2C%22excludeDefaultMomentLocales%22%3Atrue%2C%22serverRuntimeConfig%22%3A%7B%7D%2C%22publicRuntimeConfig%22%3A%7B%7D%2C%22reactStrictMode%22%3Atrue%2C%22httpAgentOptions%22%3A%7B%22keepAlive%22%3Atrue%7D%2C%22outputFileTracing%22%3Atrue%2C%22staticPageGenerationTimeout%22%3A60%2C%22swcMinify%22%3Atrue%2C%22experimental%22%3A%7B%22clientRouterFilter%22%3Afalse%2C%22clientRouterFilterRedirects%22%3Afalse%2C%22fetchCacheKeyPrefix%22%3A%22%22%2C%22middlewarePrefetch%22%3A%22flexible%22%2C%22optimisticClientCache%22%3Atrue%2C%22runtime%22%3A%22edge%22%2C%22manualClientBasePath%22%3Afalse%2C%22legacyBrowsers%22%3Afalse%2C%22newNextLinkBehavior%22%3Atrue%2C%22cpus%22%3A3%2C%22sharedPool%22%3Atrue%2C%22isrFlushToDisk%22%3Atrue%2C%22workerThreads%22%3Afalse%2C%22pageEnv%22%3Afalse%2C%22optimizeCss%22%3Afalse%2C%22nextScriptWorkers%22%3Afalse%2C%22scrollRestoration%22%3Afalse%2C%22externalDir%22%3Afalse%2C%22disableOptimizedLoading%22%3Afalse%2C%22gzipSize%22%3Atrue%2C%22swcFileReading%22%3Atrue%2C%22craCompat%22%3Afalse%2C%22esmExternals%22%3Atrue%2C%22appDir%22%3Afalse%2C%22isrMemoryCacheSize%22%3A52428800%2C%22fullySpecified%22%3Afalse%2C%22outputFileTracingRoot%22%3A%22%2Fopt%2Fbuildhome%2Frepo%22%2C%22swcTraceProfiling%22%3Afalse%2C%22forceSwcTransforms%22%3Afalse%2C%22largePageDataBytes%22%3A128000%2C%22enableUndici%22%3Afalse%2C%22adjustFontFallbacks%22%3Afalse%2C%22adjustFontFallbacksWithSizeAdjust%22%3Afalse%2C%22typedRoutes%22%3Afalse%2C%22instrumentationHook%22%3Afalse%7D%2C%22configFile%22%3A%22%2Fopt%2Fbuildhome%2Frepo%2Fnext.config.js%22%2C%22configFileName%22%3A%22next.config.js%22%7D&pagesType=pages&appDirLoader=&sriEnabled=false&incrementalCacheHandlerPath=!
2023-04-10T21:36:01.984421Z ▲ 
2023-04-10T21:36:01.984549Z ▲ ./node_modules/readable-stream/lib/_stream_writable.js:40:0
2023-04-10T21:36:01.984662Z ▲ Module not found: Can't resolve 'stream'
2023-04-10T21:36:01.984789Z ▲ 
2023-04-10T21:36:01.984925Z ▲ https://nextjs.org/docs/messages/module-not-found
2023-04-10T21:36:01.985037Z ▲ 
2023-04-10T21:36:01.985143Z ▲ Import trace for requested module:
2023-04-10T21:36:01.985252Z ▲ ./node_modules/readable-stream/readable.js
2023-04-10T21:36:01.985382Z ▲ ./node_modules/html-tokenize/index.js
2023-04-10T21:36:01.985508Z ▲ ./node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.js
2023-04-10T21:36:01.985626Z ▲ ./pages/_document.tsx
2023-04-10T21:36:01.985772Z ▲ ./node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?absolute500Path=&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=private-next-pages%2F_document.tsx&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolutePagePath=private-next-pages%2Findex.tsx&buildId=pACNkUCpKtwjMkmYi7v1Z&dev=false&isServerComponent=false&page=%2F&stringifiedConfig=%7B%22env%22%3A%7B%22REQUIRE_USER_API_KEYS%22%3Atrue%7D%2C%22eslint%22%3A%7B%22ignoreDuringBuilds%22%3Afalse%7D%2C%22typescript%22%3A%7B%22ignoreBuildErrors%22%3Afalse%2C%22tsconfigPath%22%3A%22tsconfig.json%22%7D%2C%22distDir%22%3A%22.next%22%2C%22cleanDistDir%22%3Atrue%2C%22assetPrefix%22%3A%22%22%2C%22configOrigin%22%3A%22next.config.js%22%2C%22useFileSystemPublicRoutes%22%3Atrue%2C%22generateEtags%22%3Atrue%2C%22pageExtensions%22%3A%5B%22tsx%22%2C%22ts%22%2C%22jsx%22%2C%22js%22%5D%2C%22poweredByHeader%22%3Atrue%2C%22compress%22%3Atrue%2C%22analyticsId%22%3A%22%22%2C%22images%22%3A%7B%22deviceSizes%22%3A%5B640%2C750%2C828%2C1080%2C1200%2C1920%2C2048%2C3840%5D%2C%22imageSizes%22%3A%5B16%2C32%2C48%2C64%2C96%2C128%2C256%2C384%5D%2C%22path%22%3A%22%2F_next%2Fimage%22%2C%22loader%22%3A%22default%22%2C%22loaderFile%22%3A%22%22%2C%22domains%22%3A%5B%5D%2C%22disableStaticImages%22%3Afalse%2C%22minimumCacheTTL%22%3A60%2C%22formats%22%3A%5B%22image%2Fwebp%22%5D%2C%22dangerouslyAllowSVG%22%3Afalse%2C%22contentSecurityPolicy%22%3A%22script-src%20'none'%3B%20frame-src%20'none'%3B%20sandbox%3B%22%2C%22contentDispositionType%22%3A%22inline%22%2C%22remotePatterns%22%3A%5B%5D%2C%22unoptimized%22%3Afalse%7D%2C%22devIndicators%22%3A%7B%22buildActivity%22%3Atrue%2C%22buildActivityPosition%22%3A%22bottom-right%22%7D%2C%22onDemandEntries%22%3A%7B%22maxInactiveAge%22%3A15000%2C%22pagesBufferLength%22%3A2%7D%2C%22amp%22%3A%7B%22canonicalBase%22%3A%22%22%7D%2C%22basePath%22%3A%22%22%2C%22sassOptions%22%3A%7B%7D%2C%22trailingSlash%22%3Afalse%2C%22i18n%22%3Anull%2C%22productionBrowserSourceMaps%22%3Afalse%2C%22optimizeFonts%22%3Atrue%2C%22excludeDefaultMomentLocales%22%3Atrue%2C%22serverRuntimeConfig%22%3A%7B%7D%2C%22publicRuntimeConfig%22%3A%7B%7D%2C%22reactStrictMode%22%3Atrue%2C%22httpAgentOptions%22%3A%7B%22keepAlive%22%3Atrue%7D%2C%22outputFileTracing%22%3Atrue%2C%22staticPageGenerationTimeout%22%3A60%2C%22swcMinify%22%3Atrue%2C%22experimental%22%3A%7B%22clientRouterFilter%22%3Afalse%2C%22clientRouterFilterRedirects%22%3Afalse%2C%22fetchCacheKeyPrefix%22%3A%22%22%2C%22middlewarePrefetch%22%3A%22flexible%22%2C%22optimisticClientCache%22%3Atrue%2C%22runtime%22%3A%22edge%22%2C%22manualClientBasePath%22%3Afalse%2C%22legacyBrowsers%22%3Afalse%2C%22newNextLinkBehavior%22%3Atrue%2C%22cpus%22%3A3%2C%22sharedPool%22%3Atrue%2C%22isrFlushToDisk%22%3Atrue%2C%22workerThreads%22%3Afalse%2C%22pageEnv%22%3Afalse%2C%22optimizeCss%22%3Afalse%2C%22nextScriptWorkers%22%3Afalse%2C%22scrollRestoration%22%3Afalse%2C%22externalDir%22%3Afalse%2C%22disableOptimizedLoading%22%3Afalse%2C%22gzipSize%22%3Atrue%2C%22swcFileReading%22%3Atrue%2C%22craCompat%22%3Afalse%2C%22esmExternals%22%3Atrue%2C%22appDir%22%3Afalse%2C%22isrMemoryCacheSize%22%3A52428800%2C%22fullySpecified%22%3Afalse%2C%22outputFileTracingRoot%22%3A%22%2Fopt%2Fbuildhome%2Frepo%22%2C%22swcTraceProfiling%22%3Afalse%2C%22forceSwcTransforms%22%3Afalse%2C%22largePageDataBytes%22%3A128000%2C%22enableUndici%22%3Afalse%2C%22adjustFontFallbacks%22%3Afalse%2C%22adjustFontFallbacksWithSizeAdjust%22%3Afalse%2C%22typedRoutes%22%3Afalse%2C%22instrumentationHook%22%3Afalse%7D%2C%22configFile%22%3A%22%2Fopt%2Fbuildhome%2Frepo%2Fnext.config.js%22%2C%22configFileName%22%3A%22next.config.js%22%7D&pagesType=pages&appDirLoader=&sriEnabled=false&incrementalCacheHandlerPath=!
2023-04-10T21:36:01.98594Z  ▲ 
2023-04-10T21:36:01.986057Z ▲ ./node_modules/readable-stream/readable.js:1:0
2023-04-10T21:36:01.986177Z ▲ Module not found: Can't resolve 'stream'
2023-04-10T21:36:01.986283Z ▲ 
2023-04-10T21:36:01.986389Z ▲ https://nextjs.org/docs/messages/module-not-found
2023-04-10T21:36:01.986492Z ▲ 
2023-04-10T21:36:01.986597Z ▲ Import trace for requested module:
2023-04-10T21:36:01.986702Z ▲ ./node_modules/html-tokenize/index.js
2023-04-10T21:36:01.986817Z ▲ ./node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.js
2023-04-10T21:36:01.986956Z ▲ ./pages/_document.tsx
2023-04-10T21:36:01.987084Z ▲ ./node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?absolute500Path=&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=private-next-pages%2F_document.tsx&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolutePagePath=private-next-pages%2Findex.tsx&buildId=pACNkUCpKtwjMkmYi7v1Z&dev=false&isServerComponent=false&page=%2F&stringifiedConfig=%7B%22env%22%3A%7B%22REQUIRE_USER_API_KEYS%22%3Atrue%7D%2C%22eslint%22%3A%7B%22ignoreDuringBuilds%22%3Afalse%7D%2C%22typescript%22%3A%7B%22ignoreBuildErrors%22%3Afalse%2C%22tsconfigPath%22%3A%22tsconfig.json%22%7D%2C%22distDir%22%3A%22.next%22%2C%22cleanDistDir%22%3Atrue%2C%22assetPrefix%22%3A%22%22%2C%22configOrigin%22%3A%22next.config.js%22%2C%22useFileSystemPublicRoutes%22%3Atrue%2C%22generateEtags%22%3Atrue%2C%22pageExtensions%22%3A%5B%22tsx%22%2C%22ts%22%2C%22jsx%22%2C%22js%22%5D%2C%22poweredByHeader%22%3Atrue%2C%22compress%22%3Atrue%2C%22analyticsId%22%3A%22%22%2C%22images%22%3A%7B%22deviceSizes%22%3A%5B640%2C750%2C828%2C1080%2C1200%2C1920%2C2048%2C3840%5D%2C%22imageSizes%22%3A%5B16%2C32%2C48%2C64%2C96%2C128%2C256%2C384%5D%2C%22path%22%3A%22%2F_next%2Fimage%22%2C%22loader%22%3A%22default%22%2C%22loaderFile%22%3A%22%22%2C%22domains%22%3A%5B%5D%2C%22disableStaticImages%22%3Afalse%2C%22minimumCacheTTL%22%3A60%2C%22formats%22%3A%5B%22image%2Fwebp%22%5D%2C%22dangerouslyAllowSVG%22%3Afalse%2C%22contentSecurityPolicy%22%3A%22script-src%20'none'%3B%20frame-src%20'none'%3B%20sandbox%3B%22%2C%22contentDispositionType%22%3A%22inline%22%2C%22remotePatterns%22%3A%5B%5D%2C%22unoptimized%22%3Afalse%7D%2C%22devIndicators%22%3A%7B%22buildActivity%22%3Atrue%2C%22buildActivityPosition%22%3A%22bottom-right%22%7D%2C%22onDemandEntries%22%3A%7B%22maxInactiveAge%22%3A15000%2C%22pagesBufferLength%22%3A2%7D%2C%22amp%22%3A%7B%22canonicalBase%22%3A%22%22%7D%2C%22basePath%22%3A%22%22%2C%22sassOptions%22%3A%7B%7D%2C%22trailingSlash%22%3Afalse%2C%22i18n%22%3Anull%2C%22productionBrowserSourceMaps%22%3Afalse%2C%22optimizeFonts%22%3Atrue%2C%22excludeDefaultMomentLocales%22%3Atrue%2C%22serverRuntimeConfig%22%3A%7B%7D%2C%22publicRuntimeConfig%22%3A%7B%7D%2C%22reactStrictMode%22%3Atrue%2C%22httpAgentOptions%22%3A%7B%22keepAlive%22%3Atrue%7D%2C%22outputFileTracing%22%3Atrue%2C%22staticPageGenerationTimeout%22%3A60%2C%22swcMinify%22%3Atrue%2C%22experimental%22%3A%7B%22clientRouterFilter%22%3Afalse%2C%22clientRouterFilterRedirects%22%3Afalse%2C%22fetchCacheKeyPrefix%22%3A%22%22%2C%22middlewarePrefetch%22%3A%22flexible%22%2C%22optimisticClientCache%22%3Atrue%2C%22runtime%22%3A%22edge%22%2C%22manualClientBasePath%22%3Afalse%2C%22legacyBrowsers%22%3Afalse%2C%22newNextLinkBehavior%22%3Atrue%2C%22cpus%22%3A3%2C%22sharedPool%22%3Atrue%2C%22isrFlushToDisk%22%3Atrue%2C%22workerThreads%22%3Afalse%2C%22pageEnv%22%3Afalse%2C%22optimizeCss%22%3Afalse%2C%22nextScriptWorkers%22%3Afalse%2C%22scrollRestoration%22%3Afalse%2C%22externalDir%22%3Afalse%2C%22disableOptimizedLoading%22%3Afalse%2C%22gzipSize%22%3Atrue%2C%22swcFileReading%22%3Atrue%2C%22craCompat%22%3Afalse%2C%22esmExternals%22%3Atrue%2C%22appDir%22%3Afalse%2C%22isrMemoryCacheSize%22%3A52428800%2C%22fullySpecified%22%3Afalse%2C%22outputFileTracingRoot%22%3A%22%2Fopt%2Fbuildhome%2Frepo%22%2C%22swcTraceProfiling%22%3Afalse%2C%22forceSwcTransforms%22%3Afalse%2C%22largePageDataBytes%22%3A128000%2C%22enableUndici%22%3Afalse%2C%22adjustFontFallbacks%22%3Afalse%2C%22adjustFontFallbacksWithSizeAdjust%22%3Afalse%2C%22typedRoutes%22%3Afalse%2C%22instrumentationHook%22%3Afalse%7D%2C%22configFile%22%3A%22%2Fopt%2Fbuildhome%2Frepo%2Fnext.config.js%22%2C%22configFileName%22%3A%22next.config.js%22%7D&pagesType=pages&appDirLoader=&sriEnabled=false&incrementalCacheHandlerPath=!
2023-04-10T21:36:01.987223Z ▲ 
2023-04-10T21:36:01.987336Z ▲ ./node_modules/readable-stream/readable.js:10:0
2023-04-10T21:36:01.987444Z ▲ Module not found: Can't resolve 'stream'
2023-04-10T21:36:01.987563Z ▲ 
2023-04-10T21:36:01.987674Z ▲ https://nextjs.org/docs/messages/module-not-found
2023-04-10T21:36:01.98778Z  ▲ 
2023-04-10T21:36:01.987909Z ▲ Import trace for requested module:
2023-04-10T21:36:01.988029Z ▲ ./node_modules/html-tokenize/index.js
2023-04-10T21:36:01.988136Z ▲ ./node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.js
2023-04-10T21:36:01.988242Z ▲ ./pages/_document.tsx
2023-04-10T21:36:01.988372Z ▲ ./node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?absolute500Path=&absoluteAppPath=private-next-pages%2F_app.tsx&absoluteDocumentPath=private-next-pages%2F_document.tsx&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolutePagePath=private-next-pages%2Findex.tsx&buildId=pACNkUCpKtwjMkmYi7v1Z&dev=false&isServerComponent=false&page=%2F&stringifiedConfig=%7B%22env%22%3A%7B%22REQUIRE_USER_API_KEYS%22%3Atrue%7D%2C%22eslint%22%3A%7B%22ignoreDuringBuilds%22%3Afalse%7D%2C%22typescript%22%3A%7B%22ignoreBuildErrors%22%3Afalse%2C%22tsconfigPath%22%3A%22tsconfig.json%22%7D%2C%22distDir%22%3A%22.next%22%2C%22cleanDistDir%22%3Atrue%2C%22assetPrefix%22%3A%22%22%2C%22configOrigin%22%3A%22next.config.js%22%2C%22useFileSystemPublicRoutes%22%3Atrue%2C%22generateEtags%22%3Atrue%2C%22pageExtensions%22%3A%5B%22tsx%22%2C%22ts%22%2C%22jsx%22%2C%22js%22%5D%2C%22poweredByHeader%22%3Atrue%2C%22compress%22%3Atrue%2C%22analyticsId%22%3A%22%22%2C%22images%22%3A%7B%22deviceSizes%22%3A%5B640%2C750%2C828%2C1080%2C1200%2C1920%2C2048%2C3840%5D%2C%22imageSizes%22%3A%5B16%2C32%2C48%2C64%2C96%2C128%2C256%2C384%5D%2C%22path%22%3A%22%2F_next%2Fimage%22%2C%22loader%22%3A%22default%22%2C%22loaderFile%22%3A%22%22%2C%22domains%22%3A%5B%5D%2C%22disableStaticImages%22%3Afalse%2C%22minimumCacheTTL%22%3A60%2C%22formats%22%3A%5B%22image%2Fwebp%22%5D%2C%22dangerouslyAllowSVG%22%3Afalse%2C%22contentSecurityPolicy%22%3A%22script-src%20'none'%3B%20frame-src%20'none'%3B%20sandbox%3B%22%2C%22contentDispositionType%22%3A%22inline%22%2C%22remotePatterns%22%3A%5B%5D%2C%22unoptimized%22%3Afalse%7D%2C%22devIndicators%22%3A%7B%22buildActivity%22%3Atrue%2C%22buildActivityPosition%22%3A%22bottom-right%22%7D%2C%22onDemandEntries%22%3A%7B%22maxInactiveAge%22%3A15000%2C%22pagesBufferLength%22%3A2%7D%2C%22amp%22%3A%7B%22canonicalBase%22%3A%22%22%7D%2C%22basePath%22%3A%22%22%2C%22sassOptions%22%3A%7B%7D%2C%22trailingSlash%22%3Afalse%2C%22i18n%22%3Anull%2C%22productionBrowserSourceMaps%22%3Afalse%2C%22optimizeFonts%22%3Atrue%2C%22excludeDefaultMomentLocales%22%3Atrue%2C%22serverRuntimeConfig%22%3A%7B%7D%2C%22publicRuntimeConfig%22%3A%7B%7D%2C%22reactStrictMode%22%3Atrue%2C%22httpAgentOptions%22%3A%7B%22keepAlive%22%3Atrue%7D%2C%22outputFileTracing%22%3Atrue%2C%22staticPageGenerationTimeout%22%3A60%2C%22swcMinify%22%3Atrue%2C%22experimental%22%3A%7B%22clientRouterFilter%22%3Afalse%2C%22clientRouterFilterRedirects%22%3Afalse%2C%22fetchCacheKeyPrefix%22%3A%22%22%2C%22middlewarePrefetch%22%3A%22flexible%22%2C%22optimisticClientCache%22%3Atrue%2C%22runtime%22%3A%22edge%22%2C%22manualClientBasePath%22%3Afalse%2C%22legacyBrowsers%22%3Afalse%2C%22newNextLinkBehavior%22%3Atrue%2C%22cpus%22%3A3%2C%22sharedPool%22%3Atrue%2C%22isrFlushToDisk%22%3Atrue%2C%22workerThreads%22%3Afalse%2C%22pageEnv%22%3Afalse%2C%22optimizeCss%22%3Afalse%2C%22nextScriptWorkers%22%3Afalse%2C%22scrollRestoration%22%3Afalse%2C%22externalDir%22%3Afalse%2C%22disableOptimizedLoading%22%3Afalse%2C%22gzipSize%22%3Atrue%2C%22swcFileReading%22%3Atrue%2C%22craCompat%22%3Afalse%2C%22esmExternals%22%3Atrue%2C%22appDir%22%3Afalse%2C%22isrMemoryCacheSize%22%3A52428800%2C%22fullySpecified%22%3Afalse%2C%22outputFileTracingRoot%22%3A%22%2Fopt%2Fbuildhome%2Frepo%22%2C%22swcTraceProfiling%22%3Afalse%2C%22forceSwcTransforms%22%3Afalse%2C%22largePageDataBytes%22%3A128000%2C%22enableUndici%22%3Afalse%2C%22adjustFontFallbacks%22%3Afalse%2C%22adjustFontFallbacksWithSizeAdjust%22%3Afalse%2C%22typedRoutes%22%3Afalse%2C%22instrumentationHook%22%3Afalse%7D%2C%22configFile%22%3A%22%2Fopt%2Fbuildhome%2Frepo%2Fnext.config.js%22%2C%22configFileName%22%3A%22next.config.js%22%7D&pagesType=pages&appDirLoader=&sriEnabled=false&incrementalCacheHandlerPath=!
2023-04-10T21:36:01.988523Z ▲ 
2023-04-10T21:36:01.98866Z  ▲ 
2023-04-10T21:36:01.988779Z ▲ > webpack config.resolve.alias was incorrectly overridden. https://nextjs.org/docs/messages/invalid-resolve-alias
2023-04-10T21:36:02.044658Z ▲ Error: Command "npm run build" exited with 1
2023-04-10T21:36:02.183977Z /opt/buildhome/.npm/_npx/39e2fd552b408994/node_modules/@cloudflare/next-on-pages/dist/index.js:12981
2023-04-10T21:36:02.184456Z       cliError(err.message);
2023-04-10T21:36:02.1847Z                      ^
2023-04-10T21:36:02.184881Z 
2023-04-10T21:36:02.185049Z TypeError: Cannot read properties of undefined (reading 'message')
2023-04-10T21:36:02.185215Z     at buildApplication (/opt/buildhome/.npm/_npx/39e2fd552b408994/node_modules/@cloudflare/next-on-pages/dist/index.js:12981:20)
2023-04-10T21:36:02.185392Z     at async /opt/buildhome/.npm/_npx/39e2fd552b408994/node_modules/@cloudflare/next-on-pages/dist/index.js:13085:7
2023-04-10T21:36:02.185615Z 
2023-04-10T21:36:02.185802Z Node.js v17.9.1
2023-04-10T21:36:02.22652Z  Failed: build command exited with code: 1
2023-04-10T21:36:03.423288Z Failed: error occurred while running build command
dario-piotrowicz commented 1 year ago

Hi @centminmod 🙂

as you mentioned in order to run on Cloudflare Pages you need to specify the edge runtime, but it is advised to do so per route instead of setting it in the next.config.js file.

So instead of your change I added the config to the publish api route and that seems to fix the issue and the app builds successfully.

I've opened this PR: nextjs-chatgpt-app#74 , please have a look and let me know if that works for you as well

centminmod commented 1 year ago

@dario-piotrowicz thanks that worked perfectly on my forked repo and now builds again! ❤️

image

dario-piotrowicz commented 1 year ago

@centminmod awesome! I'm glad we solved it 😄

Closing the issue since I believe it's all good now, if you still have some issues please let me know 🙂

Rahuletto commented 1 year ago

Hey, I encountered the same issue. I tried to add

export const config = {
    runtime: 'edge',
};

in the files it asked to. also added it in the next.config.js (this was not recommended but still a try)

const nextConfig = {
  // configs
  experimental: {
    runtime: 'edge',
  },
}

But still i got this same error. I thought its cached and that's why its not changing ? (just a thought) so i added a new file called teapot. its the same.

Repo: https://github.com/Rahuletto/CodeBoard I know I'm the one messing up. But would love to know what

Logs ``` 2023-06-24T12:10:03.390774Z Cloning repository... 2023-06-24T12:10:04.353894Z From https://github.com/Rahuletto/CodeBoard 2023-06-24T12:10:04.354493Z * branch 7f5a3845bf13cbb0710417a54141efbca78103e5 -> FETCH_HEAD 2023-06-24T12:10:04.354657Z 2023-06-24T12:10:04.426269Z HEAD is now at 7f5a384 EDGE FUNCTION 2023-06-24T12:10:04.426812Z 2023-06-24T12:10:04.547294Z 2023-06-24T12:10:04.581762Z Success: Finished cloning repository files 2023-06-24T12:10:05.194067Z Installing dependencies 2023-06-24T12:10:05.202917Z Python version set to 2.7 2023-06-24T12:10:08.970436Z Downloading and installing node v18.16.1... 2023-06-24T12:10:09.2647Z Downloading https://nodejs.org/dist/v18.16.1/node-v18.16.1-linux-x64.tar.xz... 2023-06-24T12:10:09.679176Z Computing checksum with sha256sum 2023-06-24T12:10:09.814291Z Checksums matched! 2023-06-24T12:10:15.284496Z Now using node v18.16.1 (npm v9.5.1) 2023-06-24T12:10:15.584819Z Started restoring cached build plugins 2023-06-24T12:10:15.596534Z Finished restoring cached build plugins 2023-06-24T12:10:16.015444Z Attempting ruby version 2.7.1, read from environment 2023-06-24T12:10:17.639148Z Using /opt/buildhome/.rvm/gems/ruby-2.7.1 2023-06-24T12:10:18.761565Z Using PHP version 5.6 2023-06-24T12:10:18.865917Z 5.2.5 is already installed. 2023-06-24T12:10:18.883436Z Using Swift version 5.2.5 2023-06-24T12:10:18.883764Z Started restoring cached node modules 2023-06-24T12:10:18.896561Z Finished restoring cached node modules 2023-06-24T12:10:19.615355Z Installing NPM modules using NPM version 9.5.1 2023-06-24T12:10:26.451719Z npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. 2023-06-24T12:10:26.611703Z npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead 2023-06-24T12:10:29.695522Z npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs 2023-06-24T12:10:43.211015Z 2023-06-24T12:10:43.211655Z added 1112 packages, and audited 1113 packages in 22s 2023-06-24T12:10:43.212015Z 2023-06-24T12:10:43.212198Z 238 packages are looking for funding 2023-06-24T12:10:43.212398Z run `npm fund` for details 2023-06-24T12:10:43.255603Z 2023-06-24T12:10:43.255991Z 44 moderate severity vulnerabilities 2023-06-24T12:10:43.256163Z 2023-06-24T12:10:43.256286Z To address issues that do not require attention, run: 2023-06-24T12:10:43.2564Z npm audit fix 2023-06-24T12:10:43.256702Z 2023-06-24T12:10:43.256873Z To address all issues (including breaking changes), run: 2023-06-24T12:10:43.257022Z npm audit fix --force 2023-06-24T12:10:43.257153Z 2023-06-24T12:10:43.257283Z Run `npm audit` for details. 2023-06-24T12:10:43.28045Z NPM modules installed 2023-06-24T12:10:43.354755Z Installing Hugo 0.54.0 2023-06-24T12:10:44.104061Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z 2023-06-24T12:10:44.107154Z Started restoring cached go cache 2023-06-24T12:10:44.126354Z Finished restoring cached go cache 2023-06-24T12:10:44.22746Z go version go1.14.4 linux/amd64 2023-06-24T12:10:44.243038Z go version go1.14.4 linux/amd64 2023-06-24T12:10:44.24907Z Installing missing commands 2023-06-24T12:10:44.24943Z Verify run directory 2023-06-24T12:10:44.249618Z Executing user command: npx @cloudflare/next-on-pages@1 2023-06-24T12:10:46.113535Z ⚡️ @cloudflare/next-on-pages CLI v.1.1.0 2023-06-24T12:10:46.116265Z ⚡️ Detected Package Manager: npm 2023-06-24T12:10:46.11656Z ⚡️ Preparing project... 2023-06-24T12:10:46.119022Z ⚡️ Project is ready 2023-06-24T12:10:46.119411Z ⚡️ Building project... 2023-06-24T12:10:47.503504Z ▲ Vercel CLI 30.2.3 2023-06-24T12:10:47.866424Z ▲ Installing dependencies... 2023-06-24T12:10:50.429571Z ▲ up to date in 2s 2023-06-24T12:10:50.430502Z ▲ 238 packages are looking for funding 2023-06-24T12:10:50.430689Z ▲ run `npm fund` for details 2023-06-24T12:10:50.446871Z ▲ Detected Next.js version: 12.2.0 2023-06-24T12:10:50.46135Z ▲ Detected `package-lock.json` generated by npm 7+... 2023-06-24T12:10:50.462025Z ▲ Running "npm run build" 2023-06-24T12:10:51.176153Z ▲ > codeboard@0.2.0 build 2023-06-24T12:10:51.176555Z ▲ > next build 2023-06-24T12:10:51.794791Z ▲ Attention: Next.js now collects completely anonymous telemetry regarding usage. 2023-06-24T12:10:51.795152Z ▲ This information is used to shape Next.js' roadmap and prioritize features. 2023-06-24T12:10:51.79531Z ▲ You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: 2023-06-24T12:10:51.795459Z ▲ https://nextjs.org/telemetry 2023-06-24T12:10:51.969372Z ▲ info - Linting and checking validity of types... 2023-06-24T12:10:57.782603Z ▲ info - Creating an optimized production build... 2023-06-24T12:11:30.614164Z ▲ info - Compiled successfully 2023-06-24T12:11:30.615358Z ▲ info - Collecting page data... 2023-06-24T12:11:33.82082Z ▲ info - Generating static pages (0/3) 2023-06-24T12:11:33.870817Z ▲ info - Generating static pages (3/3) 2023-06-24T12:11:33.88939Z ▲ info - Finalizing page optimization... 2023-06-24T12:11:33.896009Z ▲ 2023-06-24T12:11:33.920013Z ▲ Page Size First Load JS 2023-06-24T12:11:33.920529Z ▲ ┌ ○ / 26.5 kB 663 kB 2023-06-24T12:11:33.920793Z ▲ ├ /_app 0 B 79.9 kB 2023-06-24T12:11:33.921108Z ▲ ├ ○ /404 2.1 kB 83.3 kB 2023-06-24T12:11:33.921278Z ▲ ├ λ /api 0 B 79.9 kB 2023-06-24T12:11:33.921437Z ▲ ├ λ /api/connect 0 B 79.9 kB 2023-06-24T12:11:33.921589Z ▲ ├ λ /api/create 0 B 79.9 kB 2023-06-24T12:11:33.921707Z ▲ ├ λ /api/fetch 0 B 79.9 kB 2023-06-24T12:11:33.921817Z ▲ ├ λ /api/teapot 0 B 79.9 kB 2023-06-24T12:11:33.921968Z ▲ ├ λ /bin/[id] 3.28 kB 640 kB 2023-06-24T12:11:33.922096Z ▲ ├ λ /embed/[id] 1.99 kB 635 kB 2023-06-24T12:11:33.922212Z ▲ └ λ /raw/[id] 394 B 80.2 kB 2023-06-24T12:11:33.922318Z ▲ + First Load JS shared by all 79.9 kB 2023-06-24T12:11:33.922421Z ▲ ├ chunks/framework-4556c45dd113b893.js 45.2 kB 2023-06-24T12:11:33.922526Z ▲ ├ chunks/main-25e5079ab4bd6ecd.js 30.8 kB 2023-06-24T12:11:33.922652Z ▲ ├ chunks/pages/_app-e8343ff4ece7d03b.js 1.71 kB 2023-06-24T12:11:33.922767Z ▲ ├ chunks/webpack-7860755b9a45c4f7.js 2.14 kB 2023-06-24T12:11:33.92288Z ▲ └ css/7f031f4407c9cc45.css 3.71 kB 2023-06-24T12:11:33.923023Z ▲ λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) 2023-06-24T12:11:33.923142Z ▲ ○ (Static) automatically rendered as static HTML (uses no initial props) 2023-06-24T12:11:34.697208Z ▲ Traced Next.js server files in: 597.588ms 2023-06-24T12:11:36.575476Z ▲ Created all serverless functions in: 1.876s 2023-06-24T12:11:36.589672Z ▲ Collected static files (public/, static/, .next/static): 11.083ms 2023-06-24T12:11:37.741138Z ▲ Build Completed in .vercel/output [50s] 2023-06-24T12:11:37.850464Z ⚡️ Completed `npx vercel build`. 2023-06-24T12:11:39.54363Z 2023-06-24T12:11:39.544248Z ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project. 2023-06-24T12:11:39.544455Z ⚡️ 2023-06-24T12:11:39.544585Z ⚡️ The following routes were not configured to run with the Edge Runtime: 2023-06-24T12:11:39.544701Z ⚡️ - api 2023-06-24T12:11:39.54481Z ⚡️ - api/connect 2023-06-24T12:11:39.544916Z ⚡️ - api/teapot 2023-06-24T12:11:39.545039Z ⚡️ - api/create 2023-06-24T12:11:39.54518Z ⚡️ - api/fetch 2023-06-24T12:11:39.545297Z ⚡️ - raw/[id] 2023-06-24T12:11:39.545416Z ⚡️ - embed/[id] 2023-06-24T12:11:39.545526Z ⚡️ - bin/[id] 2023-06-24T12:11:39.545631Z ⚡️ 2023-06-24T12:11:39.545736Z ⚡️ Please make sure that all your non-static routes export a config object specifying the edge runtime, like: 2023-06-24T12:11:39.545842Z ⚡️ export const config = { runtime: 'edge' }; 2023-06-24T12:11:39.545946Z ⚡️ 2023-06-24T12:11:39.546078Z ⚡️ You can read more about the Edge Runtime on the Next.js documentation: 2023-06-24T12:11:39.546191Z ⚡️ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes 2023-06-24T12:11:39.546297Z 2023-06-24T12:11:39.574671Z Failed: build command exited with code: 1 2023-06-24T12:11:40.444097Z Failed: error occurred while running build command ```

I looked at your pr https://github.com/enricoros/nextjs-chatgpt-app/pull/74 and implemented the same. Still the same.