diff --git a/packages/next/src/executors/server/lib/default-server.ts b/packages/next/src/executors/server/lib/default-server.ts index 72fe9948f25db5..767c739e6757c2 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();