I’m working on a real life project and decided to test the new App directory that comes with the Next js 13 version, I noticed some glitches like my images and fonts not loading properly, etc. I would like to stop using the experimental app Dir.
Is there a way to opt out of the experimental app directory locally without having to reinstall next-app?, please I’m new to Next js.
Here is my next.config.js
/** @type {import('next').NextConfig} */
const path = require("path");
const nextConfig = {
experimental: {
appDir: true,
},
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
},
reactStrictMode: true,
images: {
loader: "akamai",
path: "/",
},
};
module.exports = nextConfig;
Whenever I put the appDir as false, I get the following error
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
at Object.findPagesDir (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistlibfind-pages-dir.js:80:19)
at DevServer.getRoutes (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistserverdevnext-dev-server.js:141:59)
at new Server (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistserverbase-server.js:115:47)
at new NextNodeServer (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistservernext-server.js:73:9)
at new DevServer (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistserverdevnext-dev-server.js:100:9)
at NextServer.createServer (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistservernext.js:152:24)
at C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistservernext.js:165:42
at async NextServer.prepare (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistservernext.js:134:24)
at async Server.<anonymous> (C:UsersFavourOneDriveDocumentsCode SchoolWebDevelopmentProjectsecommercefrontendnode_modulesnextdistserverlibrender-server.js:92:17) {
type: 'Error'
}