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

bug: Capgo not working properly in nx monorepo #463

Open
phal0r opened this issue Oct 4, 2024 · 0 comments
Open

bug: Capgo not working properly in nx monorepo #463

phal0r opened this issue Oct 4, 2024 · 0 comments

Comments

@phal0r
Copy link

phal0r commented Oct 4, 2024

Bug Report

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

Installed Dependencies:

  @capacitor/ios: 6.1.1
  @capacitor/cli: 6.1.1
  @capacitor/core: 6.1.1
  @capacitor/android: 6.1.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Plugin Version

▲   💊   Capgo Doctor  💊
│
●   App Name: 
│
●   App ID: 
│
●   App Version: 0.0.0
│
●   Web Dir: 
│
●   OS: darwin Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64
│
●   Node: v20.13.1
│
●   Installed Dependencies:
│
●     @capgo/cli: 4.20.7
│
◇  Latest Dependencies:
│
●     @capgo/cli: 4.20.7
│
◆  ✅ All dependencies are up to date

Current Behavior

Consider a nx monorepo with one package.json (and node_modules) in the root folder and the actual app residing in apps/my-app. The app itself does not have a package.json, because dependencies are shared in the monorepo.

Capacitor itself supports nx and has functions to find the correct package.json in the root path. However, if I run npx @capgo/cli bundle upload it complains, that no package.json exist.

If I create a dummy package.json, the command runs, but then cap commands fail, because the capacitor plugins are in the root node_modules folder and thus no plugins are added on the native side.

Since it works with a dummy package.json, there seems nothing important to be read from package.json, so why is it necessary at all?

Expected Behavior

It should be aligned with capacitor in monorepos and run successfully in nx environments.

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

1 participant