离子cordova运行android --prod --release

时间:2017-12-04 04:36:46

标签: cordova ionic-framework ionic3

您好我已经构建了一个离子3应用程序。 当我在开发模式下运行应用程序时它工作(离子cordova运行android),但是当我尝试在生产模式下运行它时,我得到了这个错误。

$ ionic cordova run android --prod --release
Running app-scripts build: --prod --platform android --target cordova
[01:21:08]  build prod started ...
[01:21:09]  clean started ...
[01:21:09]  clean finished in 10 ms
[01:21:09]  copy started ...
[01:21:09]  deeplinks started ...
[01:21:09]  deeplinks finished in 364 ms
[01:21:09]  ngc started ...
[01:21:17]  ngc finished in 7.74 s
[01:21:17]  preprocess started ...
[01:21:17]  preprocess finished in less than 1 ms
[01:21:17]  webpack started ...
[01:21:17]  copy finished in 8.61 s
Error: ./src/app/main.ts
Module not found: Error: Can't resolve './app.module.ngfactory' in 'C:\Users\Administrator\Documents\recepciones\src\app'
resolve './app.module.ngfactory' in 'C:\Users\Administrator\Documents\recepciones\src\app'
  using description file: C:\Users\Administrator\Documents\recepciones\package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\Users\Administrator\Documents\recepciones\package.json (relative path: ./src/app)
    using description file: C:\Users\Administrator\Documents\recepciones\package.json (relative path: ./src/app/app.module.ngfactory)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory.json doesn't exist
      as directory
        C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory doesn't exist
[C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory]
[C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory.ts]
[C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory.js]
[C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory.json]
[C:\Users\Administrator\Documents\recepciones\src\app\app.module.ngfactory]
 @ ./src/app/main.ts 2:0-60
    at new BuildError (C:\Users\Administrator\Documents\recepciones\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
    at callback (C:\Users\Administrator\Documents\recepciones\node_modules\@ionic\app-scripts\dist\webpack.js:121:28)
    at emitRecords.err (C:\Users\Administrator\Documents\recepciones\node_modules\webpack\lib\Compiler.js:269:13)
    at Compiler.emitRecords (C:\Users\Administrator\Documents\recepciones\node_modules\webpack\lib\Compiler.js:375:38)
    at emitAssets.err (C:\Users\Administrator\Documents\recepciones\node_modules\webpack\lib\Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (C:\Users\Administrator\Documents\recepciones\node_modules\webpack\lib\Compiler.js:368:12)
    at next (C:\Users\Administrator\Documents\recepciones\node_modules\tapable\lib\Tapable.js:218:11)
    at Compiler.compiler.plugin (C:\Users\Administrator\Documents\recepciones\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (C:\Users\Administrator\Documents\recepciones\node_modules\tapable\lib\Tapable.js:222:13)
    at Compiler.afterEmit (C:\Users\Administrator\Documents\recepciones\node_modules\webpack\lib\Compiler.js:365:9)

这是我的app.module文件

任何帮助都会被贬低!谢谢大家

0 个答案:

没有答案