bug: doesn't work with yarn 2 PnP
See original GitHub issueBug Report
> yarn cap add android # ppm -> 1-setup |• — ! + ? RC=1
⠋ Installing android dependencies[error] Unable to find node_modules/@capacitor/cli/package.json. Are you sure @capacitor/cli is installed? This file is currently required for Capacitor to function.
> yarn info -A @capacitor/cli # ppm -> 1-setup |• — ! + ? RC=1
└─ @capacitor/cli@npm:2.4.2
├─ Version: 2.4.2
│
├─ Exported Binaries
│ ├─ cap
│ └─ capacitor
│
└─ Dependencies
├─ chalk@npm:^2.3.0 → npm:2.4.2
├─ commander@npm:^4.1.1 → npm:4.1.1
├─ compare-versions@npm:^3.1.0 → npm:3.6.0
├─ fs-extra@npm:^4.0.3 → npm:4.0.3
├─ inquirer@npm:6.3.1 → npm:6.3.1
├─ open@npm:^6.1.0 → npm:6.4.0
├─ ora@npm:^1.3.0 → npm:1.4.0
├─ plist@npm:^3.0.1 → npm:3.0.1
├─ semver@npm:^5.4.1 → npm:5.7.1
├─ which@npm:^1.3.0 → npm:1.3.1
└─ xml2js@npm:^0.4.19 → npm:0.4.23
> npx cap doctor # ppm -> 1-setup |• — ! + ?
command not found: cap
> yarn cap doctor # ppm -> 1-setup |• — ! + ? RC=1
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 2.4.2
@capacitor/core: 2.4.2
@capacitor/android: 2.4.2
@capacitor/electron: 2.4.2
@capacitor/ios: 2.4.2
Installed Dependencies:
@capacitor/cli not installed
@capacitor/core not installed
@capacitor/android not installed
@capacitor/ios not installed
@capacitor/electron not installed
> yarn cap add @capacitor-community/electron # ppm -> 1-setup |• — ! + ?
[error] platform @capacitor-community/electron not found
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Troubleshooting | Yarn
If you get it, it very likely means that your application is not running with the PnP resolver, meaning that your require calls...
Read more >Error: Unable to locate pnpapi ... is controlled by multiple ...
What steps will reproduce the issue? Run a project with Yarn 2 pnp; Have some incorrect globalCache settings? What is the expected result?...
Read more >How to configure VSCode to run Yarn 2 (with PnP) powered ...
I had this problem last night while migrating to Yarn v2 and using PnP. Make sure that after running yarn dlx @yarnpkg/sdks vscode...
Read more >Upgrade to Yarn >2 with (or without) Plug'n'Play | by Julien ...
This is the reason why migrating to PnP can be hard: you can be depending on tools that don't use yarn node and...
Read more >Migrating our Monorepo to Yarn 2 | DoltHub Blog
I initially decided to upgrade our repository when I came across one of Yarn 2's new commands researching a solution to a dependency...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@consolenaut We removed the automatic
npm install
duringadd
in Capacitor 3, but there may be other issues and I haven’t had time to dig in to make sure everything works. I would be hesitant to fix this issue for Capacitor 2 because it depends too much on npm, but if you try Capacitor 3 and find issues, I’d be happy to look at PRs.Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.