Coder Social home page Coder Social logo

next-js-course's Introduction

"Next.js 13 for Beginners"

Full Course - 12 Chapters


Author Links

๐Ÿ‘‹ Hello, I'm Dave Gray.

๐Ÿ‘‰ My Courses

โœ… Check out my YouTube Channel with hundreds of tutorials.

๐Ÿšฉ Subscribe to my channel

โ˜• Buy Me A Coffee

๐Ÿš€ Follow Me:


Description

๐Ÿ“บ YouTube Playlist for this repository.

๐Ÿš€ This repository shares ALL of the resources referenced during the Next.js for Beginners tutorial series.

๐Ÿ“š Recommended Prerequisites


๐ŸŽ“ Academic Honesty

DO NOT COPY FOR AN ASSIGNMENT - Avoid plagiarism and adhere to the spirit of this Academic Honesty Policy.


โš™ Free Web Dev Tools

๐Ÿ“š References

๐Ÿš€ Early Project Dependencies

๐Ÿš€ Final Project Dependencies


๐Ÿ’ป Source Code

next-js-course's People

Contributors

gitdagray 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  avatar  avatar  avatar  avatar

next-js-course's Issues

Next12 update getPostsMeta and getPostsbyName due to unexpected behavior.

Remove the Github api version as it seems it is deprecated and was giving unexpected results. Too lazy to make a pr. Here is the correct fetch calls.

export async function getPostsMeta(): Promise<Meta[] | undefined> {
  const blogPosts = await fetch(
    "https://api.github.com/repos/${user}/blogs/git/trees/main?recursive=1",
    {
      headers: {
        Accept: "application/vnd.github+json",
        Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
      },
    }
  );

export async function getPostByName(
  fileName: string
): Promise<BlogPost | undefined> {
  const post = await fetch(
    `https://raw.githubusercontent.com/${user}/blogs/main/${fileName}`,
    {
      headers: {
        Accept: "application/vnd.github+json",
        Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
      },
    }
  );

Next06 Post details not showing

when clicking on a post link, it opens a 404 not found page. This is the error: Could not load content for webpack://react-devtools-extensions/react-devtools-shared/src/backend/console.js (Fetch through target failed: Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

Infinite loop of "Fast Refresh had to perform full reload"

Hi @gitdagray ,

Thanks for a great course, I've learned so much from you. I've found myself able to go through your course โ€“ I'm up to next07 โ€“ but it seems I'm often running into this aforementioned infinite loop of Fast Refresh had to perform full reload. I don't understand what's causing it.

But certainly now my machine seems to have this behaviour where even after a reboot & fresh clone:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 2023-06-03 20:18:11
โ”‚ DW-Mac derek ~
โ”‚
โ”” โฏ cd /tmp

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 2023-06-03 20:18:15
โ”‚ DW-Mac derek /tmp
โ”‚
โ”” โฏ git clone https://github.com/gitdagray/next-js-course.git
Cloning into 'next-js-course'...
cd neremote: Enumerating objects: 338, done.
remote: Counting objects: 100% (338/338), done.
remote: Compressing objects: 100% (260/260), done.
remote: Total 338 (delta 142), reused 240 (delta 44), pack-reused 0
Receiving objects: 100% (338/338), 867.77 KiB | 5.23 MiB/s, done.
Resolving deltas: 100% (142/142), done.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 2023-06-03 20:18:38
โ”‚ DW-Mac derek /tmp
โ”‚
โ”” โฏ cd next-js-course

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 2023-06-03 20:18:39
โ”‚ DW-Mac derek .../next-js-course ๎‚  main
โ”‚
โ”” โฏ cd next01

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 2023-06-03 20:18:42
โ”‚ DW-Mac derek .../next-js-course/next01 ๎‚  main
โ”‚
โ”” โฏ la
Permissions Size User  Group Date Modified    Git Name
drwxr-xr-x@    - derek wheel 2023-06-03 20:18  -- app/
drwxr-xr-x@    - derek wheel 2023-06-03 20:18  -- pages/
drwxr-xr-x@    - derek wheel 2023-06-03 20:18  -- public/
.rw-r--r--@   40 derek wheel 2023-06-03 20:18  -- .eslintrc.json
.rw-r--r--@  393 derek wheel 2023-06-03 20:18  -- .gitignore
.rw-r--r--@  134 derek wheel 2023-06-03 20:18  -- next.config.js
.rw-r--r--@ 219k derek wheel 2023-06-03 20:18  -- package-lock.json
.rw-r--r--@  492 derek wheel 2023-06-03 20:18  -- package.json
.rw-r--r--@ 1.7k derek wheel 2023-06-03 20:18  -- README.md
.rw-r--r--@  658 derek wheel 2023-06-03 20:18  -- tsconfig.json

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 2023-06-03 20:25:10
โ”‚ DW-Mac derek .../next-js-course/next01 ๎‚  main ?
โ”‚
โ”” โฏ npm i && npm run dev

added 270 packages, and audited 271 packages in 2s

102 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> [email protected] dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
warn  - You have enabled experimental feature (appDir) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

info  - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
info  - VS Code settings.json has been updated for Next.js' automatic app types, this file can be added to .gitignore if desired
event - compiled client and server successfully in 887 ms (246 modules)
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 44 ms (247 modules)
wait  - compiling /page (client and server)...
Error [NextFontError]: Failed to fetch `Inter` from Google Fonts.
    at nextFontError (/private/tmp/next-js-course/next01/node_modules/@next/font/dist/utils.js:55:17)
    at downloadGoogleFonts (/private/tmp/next-js-course/next01/node_modules/@next/font/dist/google/loader.js:87:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /private/tmp/next-js-course/next01/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js:52:93
    at async Span.traceAsyncFn (/private/tmp/next-js-course/next01/node_modules/next/dist/trace/trace.js:79:20)
error - Failed to download `Inter` from Google Fonts. Using fallback font instead.
event - compiled client and server successfully in 76s (528 modules)
wait  - compiling...
event - compiled successfully in 0 ms (310 modules)
event - compiled successfully (300 modules)
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
...

Any idea what might be causing this, or how to debug? The NextJS link doesn't seem helpful.

next06/lib/post.tsx remark-html type error

For those who are following through the course, You might encounter this issue in lesson 6

image

This is probably due to a typing issue caused by the latest version of remark-html. I was able to fix mine by downgrading to v14.0.0

Refer to this link below for additional info:

vercel/next.js#52369

next04/app/users/[userId]/page.tsx

if you're doing this on the latest nextjs version, you'll probably run into a problem when using user to flag a notFound, in this case instead of
if(!user.name)
do
if(!user?.name)

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.