Unable to Build after Upgrade - JS Heap Error
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- android, javascript, webpack
- 領域
- build-system, cli, mobile-dev
調査の方向性
まず、報告されている NativeScript CLI 6.8.0、webpack 3.10.0、nativescript-dev-webpack 0.9.2 のバージョンで tns build android を再現します。node_modules/webpack/lib/Parser.js 周辺の webpack ビルドパスを調査し、報告されているヒープ障害がこのプロジェクト固有のものか、CLI のビルドプロセス固有のものかを判断します。Android ビルドが JavaScript ヒープエラーなしで完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.8.0
- Cross-platform modules: 6.5.15 (tns-core-modules)
- Android Runtime: 6.5.3
- iOS Runtime: Not installed
- Plugin(s):
Describe the bug
I had an existing project running in the old version of {N} 4.1.3. I ran through the upgrade instructions from here https://docs.nativescript.org/releases/upgrade-instructions
After i finished all of them tried to run tns build android and it seem to finished 1 time but now all i get is a Javascript heap error every time i try to build the application. I even tried updating all my plugins to their respective latest versions
** Error Message **
Preparing project...
<--- Last few GCs --->
[6292:000001EBC9C4CFF0] 776738 ms: Scavenge 3694.2 (4116.4) -> 3685.8 (4116.7) MB, 203.2 / 0.0 ms (average mu = 0.345, current mu = 0.375) allocation failure
[6292:000001EBC9C4CFF0] 776785 ms: Scavenge 3695.4 (4116.7) -> 3689.8 (4117.2) MB, 19.1 / 0.0 ms (average mu = 0.345, current mu = 0.375) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 00007FF6CF7DB3BD]
Security context: 0x025fd44008d1 <JSObject>
1: walkFunctionExpression [00000071D731B649] [F:\GLSS\Clients\Oversii\MobileApps\NativeScript\Patrolman_Mobile_App\node_modules\webpack\lib\Parser.js:~946] [pc=00000366A1834CA5](this=0x01128b1f66a9 <Tapable map
= 000000534C2CD6D9>,0x00d7345200f1 <Node map = 00000211E55FDCE9>)
2: walkExpression [00000071D731B531] [F:\GLSS\Clients\Oversii\MobileApps\...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF6CEBC5EBF napi_wrap+114095
2: 00007FF6CEB70B46 v8::base::CPU::has_sse+66998
3: 00007FF6CEB71946 v8::base::CPU::has_sse+70582
4: 00007FF6CF386E4E v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF6CF36EF21 v8::SharedArrayBuffer::Externalize+833
6: 00007FF6CF23B18C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
7: 00007FF6CF2463C0 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
8: 00007FF6CF242EE4 v8::internal::Heap::PageFlagsAreConsistent+3204
9: 00007FF6CF2386E3 v8::internal::Heap::CollectGarbage+1283
10: 00007FF6CF236D54 v8::internal::Heap::AddRetainedMap+2452
11: 00007FF6CF25809D v8::internal::Factory::NewFillerObject+61
12: 00007FF6CEFBE1E1 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1665
13: 00007FF6CF7DB3BD v8::internal::SetupIsolateDelegate::SetupHeap+546637
14: 00000366A1834CA5
Executing webpack failed with exit code 134.
Additional context
here is a copy of my package.json dependancies after all the steps
"dependencies": {
"moment": "^2.21.0",
"moment-timezone": "^0.5.14",
"nativescript-appversion": "^1.4.4",
"nativescript-background-http": "^4.2.1",
"nativescript-camera": "^4.5.0",
"nativescript-downloader": "^2.1.5",
"nativescript-filterable-listpicker": "^2.2.6",
"nativescript-fontawesome": "^1.0.0",
"nativescript-geolocation": "^5.1.0",
"nativescript-google-maps-sdk": "^2.9.1",
"nativescript-insomnia": "^1.2.3",
"nativescript-loading-screen": "^1.0.6",
"nativescript-locate-address": "^1.0.3",
"nativescript-sqlite": "^2.6.4",
"nativescript-sqlite-commercial": "file:nativescript-sqlite-commercial-1.4.3.tgz",
"nativescript-theme-core": "^2.0.24",
"nativescript-ui-listview": "^8.2.0",
"nativescript-ui-sidedrawer": "^8.0.1",
"tns-core-modules": "^6.5.15"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"eslint": "~4.9.0",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.3.5",
"nativescript-dev-webpack": "^0.9.2",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"sass-loader": "~6.0.6",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0"
}
}
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 8
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/nativescript-cli のほかの issue
-
in-progress
NativeScript/nativescript-cli#6140 · コメント 2 件 · 担当者 1 名 ·
-
NativeScript/nativescript-cli#6090 · 担当者 1 名 ·
-
in progress
NativeScript/nativescript-cli#6015 · リアクション 1 件 · 担当者 1 名 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
NativeScript/nativescript-cli#5992 · コメント 5 件 ·
-
feature-pending-triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NativeScript/nativescript-cli#5975 ·
NativeScript/nativescript-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Seeed-Studio/wiki-documents#5655 · コメント 2 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
capricorn86/happy-dom#2435 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
Edit: CW+ オープンchannels:edit check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100