运行'npm run build'时出现错误:
节点脚本/build.js
创建优化的生产版本...
<---后几个GC --->
[432:0x38f0d20] 440313毫秒:标记扫描1356.4(1439.3)-> 1356.3 (1439.8)MB,旧空间中的分配故障GC为673.6 / 0.0 ms 请求的[432:0x38f0d20] 440848 ms:标记扫描1356.3(1439.8)-> 1356.3(1420.3)MB,534.3 / 0.0毫秒要求在旧空间中使用最后求助的GC [432:0x38f0d20] 441238毫秒:标记扫描1356.3(1420.3)-> 1356.3(1420.3)MB,389.8 / 0.0 ms请求的旧空间中的最后使用GC
<--- JS堆栈跟踪--->
==== JS堆栈跟踪======================================== =
安全上下文:0x112153c25879 0:内置出口框架:stringify(this = 0x112153c090a9,0x1863fd022d1,0x1863fd022d1 ,0x3befa98ff2f1)
1: arguments adaptor frame: 1->3 2: /* anonymous */(aka /* anonymous */) [/var/www/tixxio.loc/node_modules/webpack/lib/SourceMapDevToolPlugin.js:173]
[bytecode = 0x2534cd2bf819 offset = 238](this = 0x1863fd022d ...
致命错误:CALL_AND_RETRY_LAST分配失败-JavaScript堆 内存不足1:node :: Abort()[node] 2:0x8c20ec [node] 3: v8 :: Utils :: ReportOOMFailure(char const *,bool)[节点] 4: v8 :: internal :: V8 :: FatalProcessOutOfMemory(char const *,bool)[node] 5:v8 ::内部::工厂:: NewRawTwoByteString(int, v8 :: internal :: PretenureFlag)[节点] 6: v8 :: internal :: String :: SlowFlatten(v8 :: internal :: Handle, v8 :: internal :: PretenureFlag)[节点] 7: v8 :: internal :: JsonStringifier :: SerializeString(v8 :: internal :: Handle) [节点] 8:v8 ::内部:: JsonStringifier ::结果 v8 :: internal :: JsonStringifier :: Serialize_(v8 :: internal :: Handle, bool,v8 :: internal :: Handle)[节点] 9: v8 :: internal :: JsonStringifier :: SerializeArrayLikeSlow(v8 :: internal :: Handle, unsigned int,unsigned int)[节点] 10: v8 ::内部:: JsonStringifier ::结果 v8 :: internal :: JsonStringifier :: Serialize_(v8 :: internal :: Handle, bool,v8 :: internal :: Handle)[节点] 11: v8 ::内部:: JsonStringifier ::结果 v8 :: internal :: JsonStringifier :: Serialize_(v8 :: internal :: Handle, bool,v8 :: internal :: Handle)[节点] 12: v8 :: internal :: JsonStringifier :: Stringify(v8 :: internal :: Handle, v8 :: internal :: Handle, v8 :: internal :: Handle)[节点] 13: v8 :: internal :: Builtin_JsonStringify(int,v8 :: internal :: Object **, v8 :: internal :: Isolate *)[node] 14:0x33d5b940697d已中止(核心 npm ERR!代码ELIFECYCLE npm ERR! errno 134 npm错误! tixxio@0.1.0构建:
node scripts/build.js
npm ERR!退出状态134 npm ERR! npm ERR! tixxio@0.1.0构建脚本失败。 npm ERR! npm可能不是问题。可能还有其他 上面的日志输出。npm错误!有关此运行的完整日志,请参见:npm ERR!
/home/ihor/.npm/_logs/2018-08-20T09_54_34_401Z-debug.log
此运行的完整日志:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@6.3.0
3 info using node@v8.11.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle tixxio@0.1.0~prebuild: tixxio@0.1.0
6 info lifecycle tixxio@0.1.0~build: tixxio@0.1.0
7 verbose lifecycle tixxio@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle tixxio@0.1.0~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/tixxio.loc/node_modules/.bin:/home/ihor/bin:/home/ihor/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/ihor/Android/Sdk/tools:/home/ihor/Android/Sdk/platform-tools
9 verbose lifecycle tixxio@0.1.0~build: CWD: /var/www/tixxio.loc
10 silly lifecycle tixxio@0.1.0~build: Args: [ '-c', 'node scripts/build.js' ]
11 silly lifecycle tixxio@0.1.0~build: Returned: code: 134 signal: null
12 info lifecycle tixxio@0.1.0~build: Failed to exec build script
13 verbose stack Error: tixxio@0.1.0 build: `node scripts/build.js`
13 verbose stack Exit status 134
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid tixxio@0.1.0
15 verbose cwd /var/www/tixxio.loc
16 verbose Linux 4.15.0-32-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v8.11.2
19 verbose npm v6.3.0
20 error code ELIFECYCLE
21 error errno 134
22 error tixxio@0.1.0 build: `node scripts/build.js`
22 error Exit status 134
23 error Failed at the tixxio@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 134, true ]
我已经更新了所有依赖项。我该如何解决错误? 谢谢你的建议。