Migrating from Cordova to Capacitor in a yarn workspace #3461
-
I'm currently trying to migrate a Cordova app over to Capacitor following Ionic's documented instructions. We're excited to move to Capacitor, but I'm running into an issue right off the bat trying to install We use a monorepo configured with yarn workspaces, so we maintain our packages in a single package.json and corresponding yarn.lock at the root level, and our apps live in subdirectories. Trying to install the CLI/core packages at the project level throws an error that a dependency cannot be located. Installing these packages at the root level seems to work, but I then run into a similar error with Has anyone run into a similar issue with yarn workspaces and resolved it? The docs say that Capacitor is compatible with yarn, but my experience (as well as this merged PR referring to yarn dependency installation and monorepo support as "scope creep") makes me think otherwise and may force us to move on to another option instead of Capacitor. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Just to be clear, that PR removes the invocations of yarn from the Capacitor CLI. In Capacitor 3, we won't be invoking npm/yarn/whatever, which will improve compatibility. The scope creep was in reference to us having to support the plethora of project structures, which is a lot easier to do if we don't assume where you want dependencies installed. Can you elaborate on the errors you're seeing? |
Beta Was this translation helpful? Give feedback.
Just to be clear, that PR removes the invocations of yarn from the Capacitor CLI. In Capacitor 3, we won't be invoking npm/yarn/whatever, which will improve compatibility. The scope creep was in reference to us having to support the plethora of project structures, which is a lot easier to do if we don't assume where you want dependencies installed.
Can you elaborate on the errors you're seeing?