-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Comments
Thanks for the report we will look into that |
Ok, I will clarify my setup. I just need a little bit of time. |
Sorry for the late answer. Here are more details: I created a shell script using nx:run-commands runner. The working directory is
I only have the root package.json as nx in monorepo mode does not create a package.json in
I am using I was digging in the sourcecode and located the problematic line: https://github.com/Cap-go/CLI/blob/main/src/bundle/upload.ts#L63 It will always read a package.json, even if the bundle number is taken from somewhere else. I found a workaround by adding I still think it's a bug, because in https://github.com/Cap-go/CLI/blob/main/src/utils.ts#L116 the default for finding the root is to check for monorepos, but the call in upload.ts adds an empty string and therefor the default is not being used. |
hey @phal0r thanks for the feedback we updated the way we get the appId everywhere to get with consistency. |
Bug Report
Capacitor Version
Plugin Version
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.
The text was updated successfully, but these errors were encountered: