I created my first Next JS project with Tailwind and wanted to build it with "next build".
Then it created a folder ".next", but there is not a single .html file.
I come from the Angular world and there it simply works with "ng build".
I’m on All Inkl for my projects and of course it can’t read the Next JS files.
All files in my project are .js files
How can I make it run on my server like with Angular projects?
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
images: {
unoptimized: true,}
}
module.exports = nextConfig
I’ve tried everything Google and ChatGPT have suggested, but it just doesn’t work.
3
Answers
Thats my out folder and my package.json folders
You need to run
next start
.If you bootstrapped your project with
create-next-app
then you should have astart
script in yourpackage.json
, so should able to run either of these (depending on your package manager):npm start
pnpm start
yarn start
You need to look for out dir. You will find the exported static file there.