我的Nuxt.js代码在开发人员模式下运行良好,但是当我尝试构建项目时,每次都会出现此错误。我正在使用带有Nuxt和Vuetify的Vue js进行样式设计。
<--- Last few GCs --->
[9364:000001CD3A848F50] 98564 ms: Mark-sweep 1266.3 (1441.0) -> 1253.3 (1441.5) MB, 982.1 / 0.0 ms (average mu = 0.236, current mu = 0.194) allocation failure scavenge might not succeed
[9364:000001CD3A848F50] 99810 ms: Mark-sweep 1268.5 (1441.5) -> 1255.2 (1441.5) MB, 942.6 / 0.0 ms (average mu = 0.240, current mu = 0.244) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0000029F089DC5C1]
Security context: 0x02528061e6e9 <JSObject>
1: _addHashTableEntry$3 [0000029F613885B9] [C:\Users\Jahid\Documents\Vue Apps\foxvue\node_modules\sass\sass.dart.js:~22929] [pc=0000029F0A784FF3](this=0x03975ce20131 <JsLinkedHashMap map = 0000016E4169F479>,table=0x03975ce207d1 <Object map = 00000006753069D9>,key=0x02832ded6969 <String[23]: property-class-modifier>,value=1)
2: putIfAbsent$2 [000002...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7CCE9DD8A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
2: 00007FF7CCE78886 node::MakeCallback+4534
3: 00007FF7CCE79200 node_module_register+2032
4: 00007FF7CD1930DE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7CD19300F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7CD379804 v8::internal::Heap::MaxHeapGrowingFactor+9620
7: 00007FF7CD3707E6 v8::internal::ScavengeJob::operator=+24550
8: 00007FF7CD36EE3C v8::internal::ScavengeJob::operator=+17980
9: 00007FF7CD377B87 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF7CD377C06 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF7CD4A1CD8 v8::internal::Factory::AllocateRawArray+56
12: 00007FF7CD4A2652 v8::internal::Factory::NewFixedArrayWithFiller+66
13: 00007FF7CD223FB6 v8::internal::Dictionary<v8::internal::NumberDictionary,v8::internal::NumberDictionaryShape>::AtPut+15542
14: 00007FF7CD21D7AD v8::internal::HashTable<v8::internal::SimpleNumberDictionary,v8::internal::SimpleNumberDictionaryShape>::KeyAt+7837
15: 00007FF7CD492822 v8::internal::wasm::WasmCodeManager::LookupCode+13426
16: 0000029F089DC5C1
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] generate: `nuxt generate`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] generate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jahid\AppData\Roaming\npm-cache\_logs\2020-05-20T15_21_51_902Z-debug.log
我已经通过将Node Js更新到最新版本解决了这个问题。在我使用Node Js 10.x之前。