vue.js - Nuxt.js 构建失败
问题描述
我的 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! foxflue@1.0.0 generate: `nuxt generate`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the foxflue@1.0.0 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 之前。
推荐阅读
- angular - Angular - 在另一个组件中使用 observable(在异步数据调用中获取值)
- c# - MemberExpression.ToString() - 代入参数
- docker - 如何将 IPU 模型与 Graphcore Docker 容器一起使用?
- python - ValueError:张量转换为 dtype float32 的张量请求 dtype int32 - LSTM 实现(张量流 2.0.0)
- java - 从 Excel 工作表中获取数据时出现空指针异常
- python - 为什么选择numpy数组元素时不能使用AND运算符?
- javascript - ReactTable v7 - noDataText 未显示在空数据上(使用 useTableHook)
- python - 我对有关 python 多处理问题的问题感到困惑
- android - 将位图图像保存到画廊 android 10 的特定位置
- javascript - 如何使用 Jquery 获取类中每个项目的文本