error - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in D:\path\to\node_modules\next-fortress\package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
at packageExportsResolve (node:internal/modules/esm/resolve:645:7)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.mod._resolveFilename (D:\path\to\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at Function.mod._resolveFilename (D:\path\to\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
こんにちは。
【Next.js】アクセスコントロールパターン こちらの記事を拝見いたしまして、番外編のサーバーサイドで制御するパターンを実装したいと考えているのですが、 next.config.js内で記事と同様の設定を行うと、exportsにないimportをしているよとエラーが出るようです。
現在、こちらの方法は対応していなかったりするのでしょうか? ご確認いただけますでしょうか。
エラー内容