Next.js Discord

Discord Forum

Which folders & files to upload if use `standalone` build

Unanswered
Sutherman posted this in #help-forum
Open in Discord
I have add "standalone" to next.config.js and run build
Then I upload .next/standalone > /var/www/html
and .next/static > /var/www/html/.next/static

Is that right so far?

But if I run node ./server.js on the server, I got many errors like:
Error: Cannot find module 'next/dist/shared/lib/html-context.js'


What's the issue here?

2 Replies

???
Again have trouble with it. Would love to get an answer from an expert.