Unverified Commit f9a18134 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Remove the outdated error for find page dir (#52274)

Found this function is used by `nextra` and log unexpected warning sometimes

```
// node_modules/.pnpm/nextra@2.8.0_2yzqpfdqpxhuhtk2arnb2je2cq/node_modules/nextra/dist/index.js
// src/file-system.ts
var findPagesDirImport = __toESM(require("next/dist/lib/find-pages-dir.js"));
```
parent e2783266
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
import * as Log from '../build/output/log'
export const existsSync = (f: string): boolean => { export const existsSync = (f: string): boolean => {
try { try {
...@@ -39,16 +38,6 @@ export function findPagesDir( ...@@ -39,16 +38,6 @@ export function findPagesDir(
} }
if (!isAppDirEnabled) { if (!isAppDirEnabled) {
if (appDir != null && pagesDir == null) {
throw new Error(
'> The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config'
)
}
if (appDir != null && pagesDir != null) {
Log.warn(
'The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config'
)
}
if (pagesDir == null) { if (pagesDir == null) {
throw new Error( throw new Error(
"> Couldn't find a `pages` directory. Please create one under the project root" "> Couldn't find a `pages` directory. Please create one under the project root"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment