question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: doesn't work with yarn 2 PnP

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
imhoffdcommented, Jan 21, 2021

@consolenaut We removed the automatic npm install during add 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.

0reactions
ionitron-bot[bot]commented, Nov 11, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found