Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No /out folder is created when usign Github Actions #57

Closed
xtanion opened this issue Feb 19, 2024 · 2 comments
Closed

No /out folder is created when usign Github Actions #57

xtanion opened this issue Feb 19, 2024 · 2 comments

Comments

@xtanion
Copy link

xtanion commented Feb 19, 2024

I tried printing the files/folders after the next build in github actions. I get the following result:

Run ls -a
.
..
.eslintrc.json
.git
.github
.gitignore
.next
README.md
next-env.d.ts
next.config.js
next.config.mjs
node_modules
package-lock.json
package.json
postcss.config.js
public
src
tailwind.config.ts
tsconfig.json```
There is no `/out` folder created, However, when running on my local machine, it works just fine. Can anyone please help me with this?
@piantino
Copy link

piantino commented Mar 9, 2024

@xtanion I solved this problem removing this part:

- name: Setup Pages
        uses: actions/configure-pages@v4
        with:
          # Automatically inject basePath in your Next.js configuration file and disable
          # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
          #
          # You may remove this line if you want to manage the configuration yourself.
          static_site_generator: next

This was injecting wrong parameters for this version of Nextjs:

 ⚠ Invalid next.config.js options detected: 
 ⚠     Unrecognized key(s) in object: 'images' at "experimental"

But the next.config.mjs must have: output, images and basePath parameters:

/** @type {import('next').NextConfig} */
const nextConfig = {
    output: 'export',
    images: {
        unoptimized: true
    },
    basePath: "/"
};

export default nextConfig;

@guillett
Copy link

Thanks a lot, it is sooooo annoying to have to deal with unsolicited advise from GH with relatively complex workflow with flaws. A bug like a needle in a haystack.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants