Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Can't resolve './app.module.ngfactory' #1357

Closed
0077cc opened this issue Jan 2, 2018 · 1 comment
Closed

Can't resolve './app.module.ngfactory' #1357

0077cc opened this issue Jan 2, 2018 · 1 comment

Comments

@0077cc
Copy link

0077cc commented Jan 2, 2018

Short description of the problem:

Trying to deploy with the command:

$ ionic cordova build android --prod --release

But, I am getting this error:

Error: ./src/app/main.ts
Module not found: Error: Can't resolve './app.module.ngfactory' in '/Users/richard/Documents/Development/BTApp/src/app'
resolve './app.module.ngfactory' in '/Users/richard/Documents/Development/BTApp/src/app'
  using description file: /Users/richard/Documents/Development/BTApp/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/richard/Documents/Development/BTApp/package.json (relative path: ./src/app)
    using description file: /Users/richard/Documents/Development/BTApp/package.json (relative path: ./src/app/app.module.ngfactory)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory.json doesn't exist
      as directory
        /Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory doesn't exist
[/Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory]
[/Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory.ts]
[/Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory.js]
[/Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory.json]
[/Users/richard/Documents/Development/BTApp/src/app/app.module.ngfactory]
 @ ./src/app/main.ts 2:0-60
    at new BuildError (/Users/richard/Documents/Development/BTApp/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at callback (/Users/richard/Documents/Development/BTApp/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
    at emitRecords.err (/Users/richard/Documents/Development/BTApp/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (/Users/richard/Documents/Development/BTApp/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (/Users/richard/Documents/Development/BTApp/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (/Users/richard/Documents/Development/BTApp/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/richard/Documents/Development/BTApp/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/Users/richard/Documents/Development/BTApp/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (/Users/richard/Documents/Development/BTApp/node_modules/tapable/lib/Tapable.js:222:13)
    at Compiler.afterEmit (/Users/richard/Documents/Development/BTApp/node_modules/webpack/lib/Compiler.js:365:9)

What behavior are you expecting?

I am trying to generate the 'android-release-unsigned.apk' file

Relevant info:

$ cordova requirements

Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26,android-24,android-23
Gradle: installed /Users/richard/.sdkman/candidates/gradle/4.4.1/bin/gradle

Which @ionic/app-scripts version are you using?

cli packages: (/usr/local/lib/node_modules)
    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0
global packages:
    cordova (Cordova CLI) : 8.0.0 
local packages:
    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2
System:
    Android SDK Tools : 26.1.1
    Node              : v8.9.3
    npm               : 5.5.1 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.0 Build version 9A235 
Environment Variables:
    ANDROID_HOME : /Users/richard/Library/Android/sdk/
Misc:
    backend : pro
@mhartington
Copy link
Member

Closing as resolved in slack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants