Reputation: 876
When I followed the steps to migrate a web project to code sharing using angular, after doing tns run android --bundle, I got the following error:
ERROR in Could not resolve module C:\Ideas\Source\b2bAngular\src\app.module
Webpack compilation complete. Watching for file changes. Webpack build done! Executing before-shouldPrepare hook from C:\Ideas\Source\b2bAngular\hooks\before-shouldPrepare\nativescript-dev-webpack.js Executing before-cleanApp hook from C:\Ideas\Source\b2bAngular\hooks\before-cleanApp\nativescript-dev-webpack.js Preparing project... Executing before-prepareJSApp hook from C:\Ideas\Source\b2bAngular\hooks\before-prepareJSApp\nativescript-dev-webpack.js Gradle clean... + setting applicationId + applying user-defined configuration from C:\Ideas\Source\b2bAngular\App_Resources\Android\app.gradle + adding nativescript runtime package dependency: nativescript-optimized-with-inspector + adding aar plugin dependency: C:\Ideas\Source\b2bAngular\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:clean'.
Unable to delete directory: C:\Ideas\Source\b2bAngular\platforms\android\app\build\intermediates\assets\debug\app\app\cars\model
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 4s Unable to apply changes on device: c1f7d849. Error is: Command gradlew.bat failed with exit code 1. Executing after-watch hook from C:\Ideas\Source\b2bAngular\hooks\after-watch\nativescript-dev-webpack.js Stopping webpack watch Executing after-watch hook from C:\Ideas\Source\b2bAngular\hooks\after-watch\nativescript-dev-webpack.js
Any help is really appreciated!!
Upvotes: 0
Views: 331
Reputation: 876
It worked when I started the process again, but this time I didn't execute the update-ns-webpack script, and it worked.
So I started a new project executing that script and it didn't work, but when I created a new project without executing it, everything worked perfect.
I think is something with that script
Upvotes: 1