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.

Can not add platform with Yarn2/PnP

See original GitHub issue
> yarn cap add @capacitor-community/electron                                                     # ppm -> 1-setup |• — ! + ?
[error] platform @capacitor-community/electron not found
> yarn info -A @capacitor-community/electron                                                     # ppm -> 1-setup |• — ! + ?
└─ @capacitor-community/electron@npm:1.3.1
   ├─ Version: 1.3.1
   │
   └─ Dependencies
      ├─ @capacitor/core@npm:^2.0.0 → npm:2.4.2
      ├─ chalk@npm:^4.1.0 → npm:4.1.0
      ├─ electron-is-dev@npm:^1.2.0 → npm:1.2.0
      ├─ electron-serve@npm:^1.0.0 → npm:1.0.0
      ├─ fs-extra@npm:^8.1.0 → npm:8.1.0
      ├─ mime-types@npm:~2.1.27 → npm:2.1.27
      └─ ora@npm:^4.0.4 → npm:4.1.1

might be related to this which I opened, but since the error is different https://github.com/ionic-team/capacitor/issues/3805

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
IT-MikeScommented, Nov 23, 2020

Yes the package looks directly at node_modules

Why though, isn’t require.resolve able to do what you need?

It very well may be what is needed, however after looking this over again, this problem mainly exists in the Capacitor CLI itself, the reason the error is different is because the process in which community platforms via the cli are installed is different from the built in ones.

I will mark this external cause and will review the issue again once the CLI supports these other package managers.

0reactions
IT-MikeScommented, May 4, 2021

This is resolved in v3 so I will close this for now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plug'n'Play | Yarn - Package Manager
The following tools cannot be used with pure Plug'n'Play install (even under loose mode). Important: Even if a tool is incompatible with Plug'n'Play,...
Read more >
Cannot add platform for ios and android (Error - Stack Overflow
I get a similar error when I try to add an ios platform and I have no Idea how to fix this. android...
Read more >
Problems with Intellisense with Yarn (berry) 2 PnP and ...
yarn install; Yarn 2 PnP is now active, node_modules folder is empty (except some babel and eslint cache files). Settings now show correct ......
Read more >
Release Notes | Firebase - Google
2.1) is now available. This release includes fixes in Cloud Messaging and Cloud Firestore APIs. To install this SDK, see Add the Firebase...
Read more >
Activating and Configuring the Target Platform - RAD Studio
Add the target platform you want to use (using the Project Manager). ... Note: The native 32-bit Windows platform is technically not cross-platform....
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