Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49236

Ionic 4 apk generation not working

$
0
0

@manishtuluve wrote:

hi my name is manish and there is a isuue while running the command in ionic 4 while creating an apk as this is my first time i tried all solutuions and it is not working

i get the following error while running

C:\onlinefood> ionic cordova build android --prod --release
> ionic-app-scripts build --prod --target cordova --platform android
[14:20:40]  ionic-app-scripts 3.2.0
[14:20:40]  build prod started ...
[14:20:40]  clean started ...
[14:20:40]  clean finished in 8 ms
[14:20:40]  copy started ...
[14:20:40]  deeplinks started ...
[14:20:40]  deeplinks finished in 76 ms
[14:20:40]  ngc started ...
[14:20:47]  typescript error
            Unexpected directive 'CategoryPage in C:/onlinefood/src/pages/category/category.ts' imported by the module
            'AppModule in C:/onlinefood/src/app/app.module.ts'. Please add a @NgModule annotation.

[14:20:47]  ionic-app-script task: "build"
[14:20:47]  Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
    at C:\onlinefood\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
    at step (C:\onlinefood\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
    at Object.next (C:\onlinefood\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
    at fulfilled (C:\onlinefood\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
    at <anonymous>
[ERROR] An error occurred while running subprocess ionic-app-scripts.

        ionic-app-scripts build --prod --target cordova --platform android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

C:\onlinefood>ionic-app-scripts build --prod --target cordova --platform android --verbose
[14:21:33]  ionic-app-scripts 3.2.0
[14:21:33]  build prod started ...
[14:21:33]  clean started ...
[14:21:33]  clean finished in 5 ms
[14:21:33]  copy started ...
[14:21:33]  deeplinks started ...
[14:21:33]  deeplinks finished in 47 ms
[14:21:33]  ngc started ...
[14:21:35]  ionic-app-script task: "build"
[14:21:35]  Error: Cannot find module '@angular/compiler-cli/ngtools2'
Error: Cannot find module '@angular/compiler-cli/ngtools2'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at C:\Users\lenovo\AppData\Roaming\npm\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:206:90
    at <anonymous>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49236

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>