Code Monkey home page Code Monkey logo

nextjs-github-pages's Introduction

nextjs-github-pages's People

Contributors

dependabot[bot] avatar franzus85 avatar gregrickaby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nextjs-github-pages's Issues

Error when running `npm i` in deploy.yml action

Hi Greg, thanks so much for this!! As a nonprofit we cannot afford Vercel so this is our only option :)

Here is the error we're seeing when we run the script via github actions following https://gregrickaby.blog/article/nextjs-github-pages:

Run npm install
added 27 packages, and audited 28 packages in 4s
2 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
> build
> next build
warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
info  - Checking validity of types...
Failed to compile.
./components/CodeBlock.tsx:10:22
Type error: Cannot find name 'Prism'.
  8 | 
  9 | React.useEffect(() => {
> 10 | if (ref.current) Prism.highlightElement(ref.current,false);
    | ^
 11 |   }, [children]);
 12 | 
 13 | return (
Error: Process completed with exit code 1.

Any ideas how to debug?

Here's the script: https://github.com/onefact/handbook.onefact.org/blob/main/.github/workflows/deploy.yml

Thanks again!!!

Hangs on "Deploy"

idk what could be the issue, i followed the instruction on the blog post
when i commit and the action starts it hangs on the "Deploy" task and does nothing, no logs or anything...

did i missed something?

Statci export in github pages does not work with dynamic

Imagine having an articles page which has a single article as well which is dynamic [slug].tsx. During the build process, it throws this error:

Build error occurred
Error: Page "/articles/[slug]" is missing "generateStaticParams()" so it cannot be used with the "output: export" config.

How should we handle this situation. It is app router not page router to use generateStaticParams()

Stuck on keygen commands

Great work on the tutorial!

When running the line you gave with the keygen, the terminal said there were too many commands. So, breaking it down, I was able to get the keygen done but -t rsa returns this error message:

"-t : The term '-t' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1

  • -t rsa -b 4096 -C "$(git config user.email)" -f gh-pages -N ""
  • ~~
    • CategoryInfo : ObjectNotFound: (-t:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException "

I don't fully understand all the steps happening here, so it's tough to try and debug or find a workaround. If you have Discord and want to chat about it, let me know!

A question about `basePath`

Hey, @gregrickaby!

First of all, BIG thanks for your detailed instructions and the yml-file. I've been looking for a good starting boilerplate for deploying a Nextjs App via GitHub Pages and finally found it. You've helped me a lot.

Allow me to ask you a question.

I followed your manual in README.md but did not manage to make it. There was something wrong the path to images. Then I started experimenting. Eventually, the following changes worked for me:

  1. next.config.mjs:
/** @type {import('next').NextConfig} */
const nextConfig = {
  //...
  basePath: "", // just empty string, but not the repo name
  //...
};

export default nextConfig;
  1. Not applying any changes to the src prop of Image.

See my working commit

I'm trying to understand how it works, but I cannot get why the method above works for my repo? Maybe they've changed something in the API. Please explain.

Thank you!

Error while creating with Node[16.*]

While deploying with github actions :

 /usr/bin/git push origin gh-pages
  warning: url contains a newline in its host component: https://x-access-token:***

No `/out` folder is created when usign Github Actions

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?

Not possible to add pages in this template

Hi!

I find it difficult to create pages with this template. The app is not following the create-next-app template and I cannot create next pages as I used to under the pages folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.