Closed SpurguX closed 4 years ago
Actually this is a bug in the NS-Webpack loader 0.11. You need to downgrade it to v0.10 and it will work. I already have a PR to fix the loader; but it hasn't been pushed out yet...
Great, thanks, this solved my problem! :slightly_smiling_face:
In case anyone else reads this and has the same problem, the actual name of the package that needs to be downgraded to v0.10 is nativescript-worker-loader
Another thing that caused this for me, was not putting quotes around the keystore passwords on release.
The build process of my NS-Vue project started failing after I updated NativeScript (from 6.2 to 6.5) and it seems to have something to do with this library. I've also written a Stack Overflow post about the problem. However, I could now verify that the error occurs only when nativescript-sqlite is installed in the project. When I remove the library, the error disappears.
I've been having difficulties debugging the problem. At first I thought it was a webpack problem (as I was only running
tns run android
and getting exit code 0 from webpack) but after running the build command with the debug flag I noticed that gradlew build fails. This is the stack trace, which is not very informative:I figured it might have something to do with the library trying to import non-existent optional plugins so I tried removing the function definitions of and calls to TryLoadingEncryptionPlugin and TryLoadingSyncPlugin (as the project is only using the Commercial one), but to no avail. I have also tried adding the non-used plugins to webpack externals as per the docs but that never seemed to have any effect (the warnings remain despite pushing to externals even when the project is using NativeScript 6.2.1, in which case the build doesn't fail).
So far I haven't been able to get any more specific info as to what actually causes the error, only that it doesn't occur if nativescript-sqlite isn't installed. Any ideas what it could be about or how to debug?
Here are the parts I thought are relevant from my current package.json:
The package nativescript-sqlite is also version 2.4.0.