1. problem description.
At present, when compressing the front-end code, there are memory leaks in the nodes, errors as follows: invalid marker – collating nearby heap limit allocation failure – JavaScript heap memory
2. The errors are as follows.
Warning: callback based version of packager() has been deprecated and will be removed from future major releases, please convert to committed version or use nodeify module.
Packager application for win32 ia32 platform, using ev4.0.5
—last few times–>
ms: Mark-sweep 1294.7 (1425.0) -> 1294.7 (1425.5) MB, 1723.7/0.0 ms (average mu = 0.094, current mu = 0.000) last resort GC requests for old space
[23328:00000202C8E3E9D0] 11281890 ms: marker scan 1295.7 (1425.5)->1294.7 (1426.5) MB, 1734.9/0.0 ms (average mu = 0.101, current mu = 0.108) assignment failure clearance may not be successful
<- JS stacktrace ->
0: ExitFrame [pc: 000003C6B7315600]
Security context: 0x01457ba9e6e1 <JSObject>
1: access [0000031C1EB050F9] [fs]js: ~ 167] [pc = 000003 c6b7319b09] (= 0 x01dd68b04d69 & lt;object mapping = 00000232 d8c16af9>, = 0 x00b368108379 & lt;path string[737]:E: \pacs-consultation-electron-meeting \ node_modules \ stompjs \ node_modules \ websocket \\ node_modules \ es5-ext \ node_modules \ es6-iterator \ node_modules \ d\ node_modules \ es5-ext \ node_modules \ es6-iterator \ node_modules \ es6-iterator \ node_modules \ es6-iterator node__……
Fatal error: Invalid marker – failed collation nearby heap limit allocation – JavaScript heap memory
1: 00007 ff67be308aa v8: Internal:GCIdleTimeHandler: GCIdleTimeHandler + 4810
2: 00007 ff67be09c46 node:MakeCallback + 4518
3: 00007 ff67be0a630 node_module_register + 2160
4: 00007 ff67c09aa4e v8: Internal:FatalProcessOutOfMemory + 846
5: 00007 ff67c09a97f v8:Internal:FatalProcessOutOfMemory + 639
6: 00007 ff67c5d8984 v8:internal:heap:MaxHeapGrowingFactor + 11476
7:00007 ff67c5cf0e7 v8::internal::ScavengeJob::operator= + 25543
8: 00007 ff67c5cd65c v8:Internal:ScavengeJob::operator= + 18748
9: 00007 ff67c5d65d7 v8:Internal:Heap:MaxHeapGrowingFactor + 2343
10: 00007 ff67c5d6656 v8:Internal:Heap:MaxHeapGrowingFactor + 2470
11: 00007 ff67c1790db v8:Internal::Factory::AllocateRawWithImmortalMap + 59
12: 00007 ff67c17ba9d v8:Internal::Factory::NewRawOneByteString + 77
13: 00007 ff67c38fbc4 v8: Internal:Heavy:SmiPrint + 372
14:00007FF67C08DF5B v8::internal::StringHasher::UpdateIndex+219
15: 00007FF67C0B44CB v8::WriteUtf8+171
16: 00007FF67BD3F1A0 std::basic_ostream<:operator< +40912
17: 00007FF67BDC9B92 uv_loop_fork+13762
18: 000003c6b7315600
npm ERR!Code ELIFECYCLE
npm ERR!er!pac – electronic [email protected] build:win32: ‘ cross-env BUILD_TARGET=win32 node .electron-vue/build. js ‘
npm made a mistake! Exit Status 134
npm ERR!
npm ERR! In pac – electronic [email protected]构建:win32脚本中失败.
npm made an error! This may not be a problem with npm. There may be additional log output above.
npm made an error! The full log of this run can be found in the following file:
npm ERR!C:\Users\boyi08\AppData\Roaming\npm-cache\_logs\ 2020 – 02 – 25 – t04_43_09_617z debug.log
3. Solutions
Programme I.
In the package. inside the json: add this sentence:–max_old_space_size = 8192 // or max_old_space_size = 4096 (it is recommended to set to 4 g to see, if not set to 8 g)
“script”: {
“dev”: “node build/dev-server.” “start”: “node build/dev-server.” node -max_old_space_size=8192 build/build”.
“build”: “node -max_old_space_size=8192 build/build. js ”
},
Programme 2.
Delete the npmrc file (not the npmrc file in the nodejs installation directory under the npm module, but the .npmrc file in C: \\user\{account}\).