I'm doing a project with NextJS
and TailwindCSS
, I would like to move it statically to host it on an apache server
, but every time I try to do the "next build" command it generates the following errors:
(I don't use useContext in my files .tsx)
next.config:
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export'
};
export default nextConfig;
Repository: Github Link
For the project in Github, I made 3 changes and it builds:
output: 'export'
to next config which is not in the reposrc/app/page.tsx
, change casing in import of the Intro
component: import Intro from "@/components/Intro";
(or change the filename to intro.tsx)"moduleResolution": "node",
<-- seems to be an issue in splidejsResult:
$ npm run build
> portfolio@0.1.0 build
> next build
▲ Next.js 14.2.14
Creating an optimized production build ...
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (4/4)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ○ / 29.6 kB 117 kB
└ ○ /_not-found 875 B 88.2 kB
+ First Load JS shared by all 87.3 kB
├ chunks/117-9c48060295ddae61.js 31.7 kB
├ chunks/fd9d1056-5af6eea51486f846.js 53.7 kB
└ other shared chunks (total) 1.95 kB
○ (Static) prerendered as static content