next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Support next.js 13 in example

Open reowl666 opened this issue 2 years ago • 0 comments

Verify canary release

  • [X] I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 Binaries: Node: 16.18.0 npm: 9.0.0 Yarn: 3.2.1 pnpm: 7.13.6 Relevant packages: next: 13.0.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0

Which example does this report relate to?

https://github.com/vercel/next.js/tree/canary/examples/with-firebase-hosting

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Next.js 13 requires a dependency of raect 18.12.0 or higher, and the sample does not work.

We have confirmed the phenomenon in with-firebase-hosting, but there is a high possibility that there are other samples in the same state

  "dependencies": {
    "firebase-admin": "^9.4.2",
    "firebase-functions": "^3.13.1",
    "next": "latest",
    "react": "^17.0.2",
    "react-dom": "^17.0.2"
  },

Also, due to the specification change of the Link tag of Next.js, it is no longer necessary to enclose it in the a tag, and an error will occur when executing the sample enclosed in the a tag, so we need fix it.

    <Link href="/" className={pathname === '/' ? 'is-active' : ''}>
      Home
    </Link>{' '}

If it's only with-firebase-hosting, I'll create a pull request, but there seems to be a lot of samples in the relevant range, so my job is only to submit a request, sorry

Expected Behavior

no error

To Reproduce

Just npm install and npm run dev

reowl666 avatar Oct 27 '22 03:10 reowl666