Closed kvindascr closed 7 years ago
Try deleting the platforms
folder. From the provided log, I understand you are building for android. Also which versions of typescipt and @ngtools do you use?
Hello,
Sis0k0, I was really building IOS. In fact I needed to delete android platform at somepoint because for some reason Android issues were getting in between when building IOS.
Regarding versions they are:
Thanks.
You should have a dev dependancy of @ngtools/webpack
if you are using the nativescript-dev-webpack
plugin. Also try deleting the whole platforms folder and rebuild with npm run build-ios-bundle
. Hope that helps! If it does not, please send us a project where you can reproduce the error.
I usually see this error if I have run a non-webpack tns prepare/run/build/debug ...
before I run the webpack command. Usually I run tns platform remove ...
for both Android and iOS. Strangely, you need to remove it for both, so if I have run and Android build only, and then do an iOS webpack, the iOS webpack will fail and vice-versa.
I don't believe it's related to the tns-platform-declarations
, as I had those included in the project before and this issue only popped up with one of the updates a few weeks back.
All my dependencies are up to date with the latest versions ( including all the angular/webpack/nativescript packages, etc. ) with the exception of: rxjs: 5.0.3 typescript: 2.1.6
I got rid of this error by removing platforms and not executing the "run" command before bundling. Weird. @DickSmith Thanks!
This is quite annoying. When I debugged it, it's clearly related to the tns-platform-declarations
missing in the platforms. (The same file as the OP has)
I suspect this is some hook malfunctioning?
The suspicious folder is platforms/android/src/main/assets/app/tns_modules
. Maybe they are not cleaned across builds?
When installed tns-platform-declarations, webpack generate the following error: