简体   繁体   English

$离子cordova运行android –prod给出错误

[英]$ ionic cordova run android –prod gives errors

I would like to generate the production apk of my app with the commands 我想使用以下命令生成我的应用的生产apk

$ ionic cordova build android --prod 

and $ ionic cordova run android --prod 和$ ionic cordova运行android --prod

But these commands gives me some errors. 但是这些命令给了我一些错误。 The entire output it's here: https://pastebin.com/iygWpnxY . 整个输出在这里: https : //pastebin.com/iygWpnxY These are two error details of the ouput: 这是输出的两个错误详细信息:


Error: ./node_modules/tslib/tslib.es6.js Module build failed: TypeError: Cannot read property 'type' of undefined at Object.getEffectiveTypeAnnotationNode [....] Module not found: Error: Can't resolve './app.module.ngfactory' in 'C:\\gitlab\\veneto-app\\src\\app' resolve './app.module.ngfactory'

I've tryied to google this problem but I've found only similar errors with solution that are not usefull for me. 我试图用谷歌搜索这个问题,但是我发现解决方案中只有类似的错误对我没有用。 How can I resolve this problem? 我该如何解决这个问题?

Thank you in advance. 先感谢您。

backup existing node_modules folder and try reinstall node modules 备份现有的node_modules文件夹,然后尝试重新安装节点模块

npm install npm安装

if not works reinstall android platform 如果不起作用,请重新安装android平台

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM