1

I'm trying to next build && next export this repository https://github.com/rez-cpu/next-candy-machinev2 , rename .env.example to .env, filling the .env variables, and then try to deploy to github pages.

I'm deploying the whole /out generated folder.

next.config.js

const withTM = require("next-transpile-modules")([
  "@blocto/sdk",
  "@project-serum/sol-wallet-adapter",
  "@solana/wallet-adapter-base",
  "@solana/wallet-adapter-react",
  "@solana/wallet-adapter-wallets",
  "@solana/wallet-adapter-react-ui",
  "@solana/wallet-adapter-bitpie",
  "@solana/wallet-adapter-blocto",
  "@solana/wallet-adapter-coin98",
  "@solana/wallet-adapter-ledger",
  "@solana/wallet-adapter-mathwallet",
  "@solana/wallet-adapter-phantom",
  "@solana/wallet-adapter-safepal",
  "@solana/wallet-adapter-slope",
  "@solana/wallet-adapter-solflare",
  "@solana/wallet-adapter-sollet",
  "@solana/wallet-adapter-solong",
  "@solana/wallet-adapter-torus",
]);

/** @type {import('next').NextConfig} */
module.exports = withTM({
  reactStrictMode: true,
  webpack: (config) => {
    config.resolve.fallback = {
      fs: false,
      os: false,
      path: false,
      crypto: false,
    };

    return config;
  },
});

getting

00d03d988c2a82b7b24e.css:1 GET 
https://XXXXXXX.github.io/_next/static/css/00d03d988c2a82b7b24e.css 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/css/00d03d988c2a82b7b24e.css net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/chunks/webpack-09efcaec89a14701e09c.js net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/chunks/framework-c93ed74a065331c4bd75.js net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/chunks/main-c4f2541b93e4ae8b71f8.js net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/chunks/pages/_error-737a04e9a0da63c9d162.js net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/chunks/pages/_app-e7821e36e6ba71f623a6.js net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/MqIuX0y9L8NX9ISkbKgL4/_ssgManifest.js net::ERR_ABORTED 404
00d03d988c2a82b7b24e.css:1 GET https://XXXXXXX.github.io/_next/static/MqIuX0y9L8NX9ISkbKgL4/_buildManifest.js net::ERR_ABORTED 404
juliomalves
  • 42,130
  • 20
  • 150
  • 146
fauzt
  • 71
  • 10
  • Try adding [`basePath`](https://nextjs.org/docs/api-reference/next.config.js/basepath) and [`assetPrefix`](https://nextjs.org/docs/api-reference/next.config.js/cdn-support-with-asset-prefix) to the config with the website's base path in them. – juliomalves Jan 17 '22 at 18:00
  • If the above doesn't work, maybe this can provide the answer: [js and css not loading when hosting next application on GitHub pages](https://stackoverflow.com/questions/61450307/js-and-css-not-loading-when-hosting-next-application-on-github-pages). – juliomalves Jan 17 '22 at 18:06
  • @juliomalves still doesn't work... – Jim Jan 28 '23 at 16:35

0 Answers0