shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
69.2k stars 4.12k forks source link

[bug]: 404 This page could not be found in nextjs production #4623

Open jayachandra9 opened 3 weeks ago

jayachandra9 commented 3 weeks ago

Describe the bug

404 This page could not be found.

Affected component/components

build issue

How to reproduce

module.exports = { output: "standalone", images: { domains: ["meethour.s3.amazonaws.com"], unoptimized: true, }, };

"scripts": { "dev": "node app.js", "build": "next build", "start": "export NODE_ENV=production && node app.js", "release": "sh release.sh", "lint": "npm run pretty && next lint", "lint-fix": "next lint --fix", "sass": "node-sass --watch public/scss/main.scss public/css/style.css --source-map public/css/style.css.map", "pretty": "prettier --write \"./*/.{js,jsx,mjs,cjs,ts,tsx,json}\"" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/react-fontawesome": "^0.2.2", "@reduxjs/toolkit": "^1.9.7", "axios": "^1.6.7", "bootstrap": "^5.3.0", "dompurify": "^3.1.4", "express": "^4.19.2", "fs": "^0.0.1-security", "html-react-parser": "^5.1.10", "js-sha256": "^0.11.0", "mdb-react-ui-kit": "^6.2.0", "metismenujs": "^1.4.0", "moment": "^2.30.1", "next": "^14.2.4", "next-unused": "^0.0.6", "node-sass": "^9.0.0", "path": "^0.12.7", "react": "^18.3.1", "react-bootstrap": "^2.7.4", "react-countup": "^6.4.2", "react-dom": "^18.3.1", "react-google-recaptcha": "^3.1.0", "react-helmet": "^6.1.0", "react-hook-form": "^7.51.1", "react-loading-skeleton": "^3.4.0", "react-player": "^2.13.0", "react-redux": "^8.1.3", "react-search-autocomplete": "^8.5.2", "react-share": "^5.1.0", "react-slick": "^0.29.0", "react-visibility-sensor": "^5.1.1", "redux": "^4.2.1", "sharp": "^0.32.1", "slick-carousel": "^1.8.1", "video-react": "^0.16.0", "wowjs": "^1.1.3" },

release.sh

!/bin/bash

NODE_ENV=production rm -r out out.zip npm run build && mkdir out cd ./.next/standalone cd ../.. cp -r ./.next/standalone/* ./.next/standalone/.next ./public ./slices ./utils ./out cp -r ./.next/static ./out/.next/static mv ./out/server.js ./out/app.js cp ./app.js ./out/app.js rm -fr ./out/node_modules cp -r node_modules ./out/node_modules cp package.json ./out/package.json zip -r out.zip ./out rm -fr ./out && rm -fr ./.next

Codesandbox/StackBlitz link

No response

Logs

404
This page could not be found.

System Info

module.exports = {
  output: "standalone",
  images: {
    domains: ["meethour.s3.amazonaws.com"],
    unoptimized: true,
  },
};

Before submitting

kelvinCJJ commented 2 weeks ago

Is it shown when you ran build?