我在 Ubuntu 18.04(4 核,8GB RAM)上构建 next.js 应用程序时遇到问题。它在我的本地 Windows 计算机上运行良好,但在我的 ci 服务器上失败并出现以下错误。该应用程序只是启用了打字稿的初始默认应用程序。我在节点 v14.15.1 上。
错误:
frontend@0.1.0 build /root/builds/sbhwz7X3/0/xxx/xxx/frontend
next build
info - Creating an optimized production build ...events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn /usr/bin/node EAGAIN
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -11,
code: 'EAGAIN',
syscall: 'spawn /usr/bin/node',
path: '/usr/bin/node',
spawnargs: [
'/root/builds/sbhwz7X3/0/xxx/xxx/frontend/node_modules/jest-worker/build/workers/processChild.js'
]
}
npm ERR! …Run Code Online (Sandbox Code Playgroud)