Next.js Discord

Discord Forum

Error after upgrading Next from 13 to 14

Answered
Schneider’s Smooth-fronted Caima… posted this in #help-forum
Open in Discord
Schneider’s Smooth-fronted CaimanOP
Hello!

I'm trying to build my app and I'm getting: Cannot read properties of undefined (reading 'app')

it's happening after running this:
nx export companion --configuration=local-dev

I use pages router, 0 usage of app router.

when I run --verbose I see that app relates to:
    if (enabledDirectories.app) {
        serverActionsManifest = require((0, _path.join)(distDir, _constants1.SERVER_DIRECTORY, _constants1.SERVER_REFERENCE_MANIFEST + ".json"));
        if (nextConfig.output === "export") {
            if (Object.keys(serverActionsManifest.node).length > 0 || Object.keys(serverActionsManifest.edge).length > 0) {
                throw new ExportError(`Server Actions are not supported with static export.`);
            }
        }
    }


How can I fix this?
Answered by Schneider’s Smooth-fronted Caiman
@Southern rough shrimp I think I fixed this actually.

"options": {
"outputPath": "dist/apps/companion"
},

dist/ was needed for some reason in my nx config
View full answer

3 Replies