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

@clerk/backend wrong peer deps #4897

Closed
4 tasks done
y-nk opened this issue Jan 15, 2025 · 2 comments
Closed
4 tasks done

@clerk/backend wrong peer deps #4897

y-nk opened this issue Jan 15, 2025 · 2 comments

Comments

@y-nk
Copy link

y-nk commented Jan 15, 2025

Preliminary Checks

Reproduction

pnpm i @clerk/express
.
└─┬ @clerk/express 1.3.34
  ├── ✕ missing peer express@"^4.17.0 || ^5.0.0"
  ├─┬ @clerk/shared 2.20.6
  │ ├── ✕ missing peer react@"^18.0.0 || ^19.0.0 || ^19.0.0-0"
  │ └─┬ swr 2.3.0
  │   ├── ✕ missing peer react@"^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
  │   └─┬ use-sync-external-store 1.4.0
  │     └── ✕ missing peer react@"^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
  └─┬ @clerk/backend 1.22.0
    └── ✕ missing peer react@"^18.0.0 || ^19.0.0 || ^19.0.0-0"

Publishable key

pk_test_123456789

Description

Package is intended to use in node environments, tho there's react as peer dependency which mess up with pnpm install when auto-install of peer deps is enabled (for good reason)

Environment

System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M2
    Memory: X MB / 16.00 GB
  Binaries:
    Node: 23.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - /opt/homebrew/bin/npm
    pnpm: 9.11.0 - ~/Library/pnpm/.tools/pnpm/9.11.0/bin/pnpm
  npmPackages:
    @clerk/express: ^1.3.34 => 1.3.34
    @y_nk/nestjs-clerk: ^1.0.0 => 1.0.0
    typescript: ^5.7.3 => 5.7.3
@y-nk y-nk added the needs-triage A ticket that needs to be triaged by a team member label Jan 15, 2025
@y-nk y-nk changed the title @clerk/express/@clerk/backend wrong peer deps @clerk/backend wrong peer deps Jan 15, 2025
@LekoArts LekoArts removed the needs-triage A ticket that needs to be triaged by a team member label Jan 15, 2025
@LekoArts
Copy link
Member

Hi, thanks for the issue!

I tried to reproduce your steps but didn't see the issue:

➜ pnpm init
Wrote to /Users/lejoe/code/playground/issue-4897/package.json

{
  "name": "issue-4897",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

playground/issue-4897 is 📦 1.0.0 via ⬢ v20.11.1
➜ pnpm i @clerk/express
Packages: +90
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 90, reused 85, downloaded 5, added 90, done
node_modules/.pnpm/@[email protected][email protected]/node_modules/@clerk/shared: Running postinstall script, done in 37ms

dependencies:
+ @clerk/express 1.3.34

Done in 3.3s

I use pnpm 9.15.4. Anyhow, the package in question correctly sets these peer dependencies as optional:

"peerDependenciesMeta": {
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
},

So if you continue to run into this issue I'd recommend opening an issue with pnpm, one possible related issue I found is pnpm/pnpm#8142

@LekoArts LekoArts closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
@y-nk
Copy link
Author

y-nk commented Jan 16, 2025

@LekoArts thanks a lot. i'm gonna look at my version of pnpm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants