pkg打包失败处理

字数 246阅读 861

pkg@4.3.4
Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v8.11.3-win-x64 [ ] 0%

C:\Users\Administrator.pkg-cache

.pkg-cache 文件损坏会导致打包失败,删掉缓存即可。

internal/child_process.js:313
throw errnoException(err, 'spawn');
^

Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:503:9)
at fabricate (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pkg\lib-es5\fabricator.js:73:54)
at fabricateTwice (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pkg\lib-es5\fabricator.js:139:3)
at MultiStream._queue (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pkg\lib-es5\producer.js:120:53)
at MultiStream._next (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pkg\node_modules\multistream\index.js:73:10)
at Meter.onEnd (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pkg\node_modules\multistream\index.js:120:10)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at Meter.emit (events.js:208:7)

推荐阅读更多精彩内容