From 438dff76f56cb6879ff6c6bef28f708db832ab63 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Mon, 24 Apr 2023 11:14:08 -0400 Subject: [PATCH] fix(nextjs): use require("next") since exports.default is no longer provided (#16497) (cherry picked from commit 786323d5cdac90f5c887ced6b2c31854431a1326) --- packages/next/src/executors/server/lib/default-server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/next/src/executors/server/lib/default-server.ts b/packages/next/src/executors/server/lib/default-server.ts index e77e1205de78e8..2002875a0cbb2b 100644 --- a/packages/next/src/executors/server/lib/default-server.ts +++ b/packages/next/src/executors/server/lib/default-server.ts @@ -1,6 +1,4 @@ import * as express from 'express'; -import * as path from 'path'; -import next from 'next'; import { NextServerOptions, ProxyConfig } from '../../../utils/types'; /** @@ -11,6 +9,7 @@ export async function defaultServer( settings: NextServerOptions, proxyConfig?: ProxyConfig ): Promise { + const next = require('next'); const app = next(settings); const handle = app.getRequestHandler();