-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Capacitor: On 16.2 node modules get removed after sync step #962
Comments
@arendjantetteroo I added a option to preserve the node_modules folder |
@DominikPieper i tried on 16.2.1 but i'm probably doing something wrong. I've got this step in my app/project.json file:
and then run with "app:sync" and still get this output:
Should that option be somewhere else in my config? |
Looking at the generated js code in my node_modules i see this:
So if i use preserveNodeModules = false in my project.json, i get the behaviour i expect. But that naming seems inverted? |
@arendjantetteroo ah damn. It was to late yesterday ^^' |
@DominikPieper it happens, i'm happy you already got back to this issue so quickly in the first place. :) |
@arendjantetteroo merged it. I'll do a hotfix release soon. Don't mind the failed run. That's the ionic-react linter tests. I have to fix the linter setup |
@DominikPieper thanks, greatly appreciated! |
First off, thanks for the work that goes into these extensions!
Describe the bug
I depend on the node_modules in my projectRoot to be left as is after the sync step. This way i can add the full directory as an artifact, so I can in a later ci job use the capacitor plugins without needing a nodejs environment to install them.
This way i can just build my android app with an android docker environment that isn't cluttered with nodejs.
To Reproduce
Since this commit on running a capacitor command, at the end the node_modules directory is removed from the project root.
c2beee9
nx-extensions/packages/capacitor/src/executors/cap/executor.ts
Line 70 in 65684f6
Steps to reproduce the behavior:
Run app:sync for a capacitor project based on a nextjs project.
(so i run with app:build, then app:export)
Expected behavior
Having a flag to keep the node_modules or a way to copy them first into a dist directory, alongside the ios/android directories.
So on running sync, i expect to have a directory somewhere with the ios and android directories alongside their needed node_modules containing the java/swift code and anything else needed so either android studio/xcode or tools like fastlane can package that up into a native app package without needing a nodejs environment.
If there is another/better way to do this, i'm open to suggestions.
The text was updated successfully, but these errors were encountered: