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

Latest @clerk/nextjs package uses deprecated dependency. #3109

Closed
4 tasks done
RicardoGEsteves opened this issue Apr 4, 2024 · 1 comment
Closed
4 tasks done

Latest @clerk/nextjs package uses deprecated dependency. #3109

RicardoGEsteves opened this issue Apr 4, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@RicardoGEsteves
Copy link

RicardoGEsteves commented Apr 4, 2024

Preliminary Checks

Reproduction

https://codesandbox.io/p/devbox/github/codesandbox/sandbox-templates/tree/main/nextjs-app-router?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clukp9xtb00073j6gc2wwoyoh%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clukp9xtb00023j6grpgdiq8l%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clukp9xtb00043j6graq4yi8m%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clukp9xtb00063j6gtdcrstwc%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clukp9xtb00023j6grpgdiq8l%2522%253A%257B%2522id%2522%253A%2522clukp9xtb00023j6grpgdiq8l%2522%252C%2522tabs%2522%253A%255B%255D%257D%252C%2522clukp9xtb00063j6gtdcrstwc%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clukp9xtb00053j6gkpisaxqx%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A3000%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clukp9xtb00063j6gtdcrstwc%2522%252C%2522activeTabId%2522%253A%2522clukp9xtb00053j6gkpisaxqx%2522%257D%252C%2522clukp9xtb00043j6graq4yi8m%2522%253A%257B%2522id%2522%253A%2522clukp9xtb00043j6graq4yi8m%2522%252C%2522activeTabId%2522%253A%2522clukplmig00c23j6furasf1ur%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clukp9xtb00033j6gp2316zaa%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522pnpm%2520add%2520%2540clerk%252Fnextjs%2522%252C%2522id%2522%253A%2522clukpj1i0002n3j6figfp5jpj%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522pnpm%2520why%2520%2540types%252Fmime%2522%252C%2522id%2522%253A%2522clukplmig00c23j6furasf1ur%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A36.75824175824176%257D

Publishable key

.

Description

Latest @clerk/nextjs package introduced a deprecated dependency, you are using @types/mime@4.0.0.
That dependency is deprecated and can create some unwanted vulnerabilities!

 WARN  1 deprecated subdependencies found: @types/mime@4.0.0

dependencies:
@clerk/nextjs 4.29.10
└─┬ @clerk/clerk-sdk-node 4.13.12
├─┬ @types/cookies 0.7.7
│ └─┬ @types/express 4.17.14
│ ├─┬ @types/express-serve-static-core 4.17.43
│ │ └─┬ @types/send 0.17.4
│ │ └── @types/mime 1.3.5
│ └─┬ @types/serve-static 1.15.7
│ └─┬ @types/send 0.17.4
│ └── @types/mime 1.3.5
└─┬ @types/express 4.17.14
├─┬ @types/express-serve-static-core 4.17.43
│ └─┬ @types/send 0.17.4
│ └── @types/mime 1.3.5
└─┬ @types/serve-static 1.15.7
└─┬ @types/send 0.17.4
└── @types/mime 1.3.5

Environment

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 1.85 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    @clerk/nextjs: ^4.29.10 => 4.29.10 
    @types/node: ^20 => 20.11.5 
    @types/react: ^18 => 18.2.48 
    @types/react-dom: ^18 => 18.2.18 
    eslint: ^8 => 8.56.0 
    eslint-config-next: 14.1.0 => 14.1.0 
    next: 14.1.0 => 14.1.0 
    react: ^18 => 18.2.0 
    react-dom: ^18 => 18.2.0 
    typescript: ^5 => 5.3.3

You can check the mimo repo for more context: https://github.com/broofa/mime#readme, but migrating to v4 that package for types its not needed:

@RicardoGEsteves RicardoGEsteves added the needs-triage A ticket that needs to be triaged by a team member label Apr 4, 2024
@LekoArts LekoArts added duplicate This issue or pull request already exists and removed needs-triage A ticket that needs to be triaged by a team member labels Apr 4, 2024
@LekoArts
Copy link
Member

LekoArts commented Apr 4, 2024

Hi, thanks for the issue. Your issue is a duplicate of #3074 and the underlying issue was already fixed here: DefinitelyTyped/DefinitelyTyped#69231

When I do a fresh install of @clerk/nextjs it shows that it's working as intended:

playground/nextjs-mime-test is 📦 1.0.0 via ⬢ v20.11.1
➜ yarn add @clerk/nextjs
yarn add v1.22.19
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "@clerk/nextjs > @clerk/clerk-react@4.30.8" has unmet peer dependency "react@>=16".
warning "@clerk/nextjs > @clerk/shared > swr@2.2.0" has unmet peer dependency "react@^16.11.0 || ^17.0.0 || ^18.0.0".
warning "@clerk/nextjs > @clerk/shared > swr > use-sync-external-store@1.2.0" has unmet peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning " > @clerk/nextjs@4.29.10" has unmet peer dependency "next@>=10".
warning " > @clerk/nextjs@4.29.10" has unmet peer dependency "react@^17.0.2 || ^18.0.0-0".
warning " > @clerk/nextjs@4.29.10" has unmet peer dependency "react-dom@^17.0.2 || ^18.0.0-0".
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 45 new dependencies.
info Direct dependencies
└─ @clerk/nextjs@4.29.10
info All dependencies
├─ @clerk/clerk-react@4.30.8
├─ @clerk/clerk-sdk-node@4.13.12
├─ @clerk/nextjs@4.29.10
├─ @peculiar/asn1-schema@2.3.8
├─ @peculiar/webcrypto@1.4.1
├─ @types/cookies@0.7.7
├─ @types/express-serve-static-core@4.17.43
├─ @types/express@4.17.14
├─ @types/http-errors@2.0.4
├─ @types/keygrip@1.0.6
├─ @types/mime@1.3.5
├─ @types/node-fetch@2.6.2
├─ @types/range-parser@1.2.7
├─ asn1js@3.0.5
├─ asynckit@0.4.0
├─ camelcase-keys@6.2.2
├─ camelcase@5.3.1
├─ combined-stream@1.0.8
├─ cookie@0.5.0
├─ csstype@3.1.1
├─ deepmerge@4.2.2
├─ delayed-stream@1.0.0
├─ dot-case@3.0.4
├─ form-data@3.0.1
├─ glob-to-regexp@0.4.1
├─ js-cookie@3.0.1
├─ lower-case@2.0.2
├─ map-obj@4.3.0
├─ mime-db@1.52.0
├─ mime-types@2.1.35
├─ no-case@3.0.4
├─ node-fetch-native@1.0.1
├─ path-to-regexp@6.2.1
├─ pvutils@1.1.3
├─ quick-lru@4.0.1
├─ snake-case@3.0.4
├─ snakecase-keys@3.2.1
├─ swr@2.2.0
├─ to-no-case@1.0.2
├─ to-snake-case@1.0.0
├─ to-space-case@1.0.0
├─ type-fest@2.19.0
├─ undici-types@5.26.5
├─ use-sync-external-store@1.2.0
└─ webcrypto-core@1.7.9
✨  Done in 6.21s.

playground/nextjs-mime-test is 📦 1.0.0 via ⬢ v20.11.1 took 6.4s
➜ yarn why @types/mime
yarn why v1.22.19
[1/4] 🤔  Why do we have the module "@types/mime"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@types/mime@1.3.5"
info Reasons this module exists
   - "@clerk#nextjs#@clerk#clerk-sdk-node#@types#express#@types#express-serve-static-core#@types#send" depends on it
   - Hoisted from "@clerk#nextjs#@clerk#clerk-sdk-node#@types#express#@types#express-serve-static-core#@types#send#@types#mime"
info Disk size without dependencies: "24KB"
info Disk size with unique dependencies: "24KB"
info Disk size with transitive dependencies: "24KB"
info Number of shared dependencies: 0
✨  Done in 0.04s.

@LekoArts LekoArts closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants