Coder Social home page Coder Social logo

nextjs-blog-from-scratch's People

Contributors

shzawa avatar usagizmo avatar

Forkers

usagizmo

nextjs-blog-from-scratch's Issues

PreRendering時に/posts/[id].tsxの`TagsLayout`の`key`がundefinedでエラー

状況

npm run dev実行後 http://localhost:3000 にアクセスすると以下のようなエラー

→ npm run dev

> [email protected] dev /Users/ozawa_shotaro/sandbox/nextjs-blog
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Using webpack 4. Reason: custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
event - compiled successfully
event - build page: /
wait  - compiling...
event - compiled successfully
Warning: TagsLayout: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)
    at TagsLayout (webpack-internal:///./components/layout.tsx:132:20)
    at li
    at ul
    at section
    at main
    at div
    at Container (webpack-internal:///./components/layout.tsx:24:19)
    at HomeLayout (webpack-internal:///./components/layout.tsx:59:20)
    at HomePage (webpack-internal:///./pages/index.tsx:34:18)
    at MyApp (webpack-internal:///./pages/_app.tsx:24:15)
    at AppContainer (/Users/ozawa_shotaro/sandbox/nextjs-blog/node_modules/next/dist/next-server/server/render.js:28:950)

分かっていること

  • PreRendering時にはTagsLayout内のliタグのkeyが空
    • keyが空の時空文字を挿入 -> 効果なし

404ページ全部効かなくなってる

状況

なにこれ…
何もしてないのに壊れちゃった❗

試したこと

正常に動いていたcommitに遡ってnpm iし直して再現した
-> 効かなくなってるのが再現された

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.