-
Notifications
You must be signed in to change notification settings - Fork 2
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
cordovaOptions glob array resources copy not being waited for #14
Comments
This went from a nuisance to a blocker on a recent project. I tracked the problem down to the copy method from fs-extra. I confirmed that the problem is present in its latest version (v3.0.1), too. @jdalton reported a similar problem with the The underlying problem appears to be with ncp. I'm dealing with it, locally, by patching lines 68-70 with: var copies = files.map(function(file) {
return copy(file, destPath(file))
.catch(function(error) {
console.error('First attempt at copying', file,
'failed because of', error, 'Trying again...');
return copy(file, destPath(file));
});
}); It's not a sexy solution, but it's made it so I can build without random crashes. |
Looks like the upstream problem with fs-extra was resolved with jprichardson/node-fs-extra#502? |
This seems to be a race-condition.
This has been an issue before we upgraded to
steal-cordova
1.0.0
but it seems that the upgrade made the problem go from having to run the build command a few times, to it not working at all unless we take out the command to delete the build directory from the start of our build script.The error complains that a file specified in the glob array used with
steal-cordova
does not exist. The file that errors is different each time until the build finally succeeds.The temp fix has been to remove
npm run clean &&
from our build script"build": "npm run clean && node build"
in ourpackage.json
to keep the build dir contents intact. We still have to run the build 2-7 times before it stops giving the file errors listed above. Once the build succeeds it always seems to work the 1st time.When switching between an iOS and Android build I manually delete the build folder and have to go through the 2-7 runs again for it to complete.
The text was updated successfully, but these errors were encountered: