我的离子3应用程序在离子服务中正常工作,但是当构建时,它会停止以下错误
==== JS stack trace =========================================
Security context: 000000200D3CFB49 <JS Object>
1: DoJoin(aka DoJoin) [native array.js:~129] [pc=00000315AEFE6C02] (this=000000200D304381 <undefined>,w=000000FF69DCAE69 <JS Array[414]>,x=414,N=000000200D3043C1 <true>,J=000000200D3AE4C9 <String[1]: >,I=000000200D3B46D9 <JS Function ConvertToString (SharedFunctionInfo 000000200D352DC9)>)
2: Join(aka Join) [native array.js:180] [pc=00000315AEFFA292] (this=000000200D304381 <undefined>...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
和我的离子信息
@ionic/cli-utils : 1.10.2
ionic (Ionic CLI) : 3.10.3
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.1
System:
Android SDK Tools : 24.4.1
Node : v6.10.3
npm : 3.10.10
OS : Windows 7
预先感谢
我已经用以下步骤解决了问题:
- add " C: Windows System32" 在环境环境变量路径中。
- 离子Cordova平台RM Android 删除平台
- 使用Cordova添加平台 Cordova平台添加Android
- Ionic Cordova运行Android
- 在您的项目中检查生成的APK, ex:d: ionic3 distify platforms android android build utputs apk
我希望这是最新离子版本引起的问题,谢谢所有
我在package.json中更新了构建脚本。
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "node --max-old-space-size=2048 ./node_modules/.bin/ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "node --max-old-space-size=2048 ./node_modules/.bin/ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},