v2.2.27 is failing install with pnpm because of @clerk/ui referencing file-based packages
Closed this issue · 1 comments
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
A repo is not required for reproducing. The issue occurs with a fresh project, as outlined below.
Publishable key
pk_test_bGl2ZS1jbGFtLTk1LmNsZXJrLmFjY291bnRzLmRldiQ
Description
Steps to reproduce:
- Create an empty pnpm project
- Add @clerk/clerk-expo@latest package
pnpm init
pnpm install
pnpm add @clerk/clerk-expo@latest
Expected behavior:
The package should install into the project without any errors.
Actual behavior:
An error occurs
` ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND Could not install from "C:\Workspace\Temp\elements" as it does not exist.
This error happened while installing the dependencies of @clerk/clerk-expo@2.2.27
at @clerk/clerk-js@5.28.0
at @clerk/ui@0.1.9
Progress: resolved 64, reused 62, downloaded 1, added 0`
Below are my observations by looking at the source code
- @clerk/clerk-expo@2.2.26 does not have this problem. It depends on @clerk/clerk-js@5.27.0.
- @clerk/clerk-expo@2.2.27 depends on @clerk/clerk-js@5.28.0.
- @clerk/clerk-js@5.28.0 depends on @clerk/ui@0.1.9 while @clerk/clerk-js@5.27.0 did not have this dependency.
- @clerk/ui@0.1.9 defines its dependencies using "file://" protocol which is the source of the problem
Using npm instead of pnpm
When I ran the same commands using npm instead of pnpm, it didn't complain anything. However, npm did not install the file protocol dependencies of @clerk/ui. @clerk/types and @clerk/shared got installed because they are dependencies of other clerk packages. @clerk/elements didn't get installed which is the dependency of only @clerk/ui.
Environment
System:
OS: Windows 11 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
Memory: 3.56 GB / 15.79 GB
Binaries:
Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.12.2 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
Same here 🆙