我使用 Ionic 3 和 Electron 构建了桌面应用程序。
离子版本:3.9.2
电子版本:2.0.7
当我运行命令以导出Windows应用程序时,出现此错误:
运行命令:
电子生成器
电子生成器版本= 20.28.1
已加载的配置文件= package.json(“内部”字段)
编写有效的配置文件= dist \ builder-effective-config.yaml
Error: Unresolved node modules: core-js
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\util\packageDependencies.ts:108:17
From previous event:
at Collector.resolveUnresolvedHoisted (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\util\packageDependencies.ts:164:10)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\util\packageDependencies.ts:82:28
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at Collector.collect (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\util\packageDependencies.ts:84:6)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\out\util\packageDependencies.js:123:47
at Generator.next (<anonymous>)
From previous event:
at getProductionDependencies (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\out\util\packageDependencies.js:128:17)
at Lazy.<anonymous> (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:112:24)
at Generator.next (<anonymous>)
From previous event:
at Lazy.get value [as value] (C:\Users\Mohammad\Documents\Project\poker\node_modules\lazy-val\src\main.ts:18:23)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\util\yarn.ts:128:81
at Generator.next (<anonymous>)
From previous event:
at rebuild (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\out\util\yarn.js:239:18)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\util\yarn.ts:20:11
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at installOrRebuild (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\out\util\yarn.js:68:17)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:457:13
at Generator.next (<anonymous>)
From previous event:
at Packager.installAppDependencies (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:418:70)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:368:20
at Generator.next (<anonymous>)
From previous event:
at Packager.doBuild (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:344:39)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:314:57
at Generator.next (<anonymous>)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\graceful-fs\graceful-fs.js:99:16
at C:\Users\Mohammad\Documents\Project\poker\node_modules\graceful-fs\graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
at Packager._build (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:285:133)
at C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:281:23
at Generator.next (<anonymous>)
From previous event:
at Packager.build (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\packager.ts:238:14)
at build (C:\Users\Mohammad\Documents\Project\poker\node_modules\app-builder-lib\src\index.ts:58:28)
at build (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\src\builder.ts:227:10)
at then (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\src\cli\cli.ts:42:48)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at Object.args [as handler] (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\src\cli\cli.ts:42:48)
at Object.runCommand (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\node_modules\yargs\lib\command.js:237:44)
at Object.parseArgs [as _parseArgs] (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\node_modules\yargs\yargs.js:1085:24)
at Object.get [as argv] (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\node_modules\yargs\yargs.js:1000:21)
at Object.<anonymous> (C:\Users\Mohammad\Documents\Project\poker\node_modules\electron-builder\src\cli\cli.ts:25:28)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! persis-poker@0.0.1 dist: electron-builder
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the persis-poker@0.0.1 dist 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\Mohammad\AppData\Roaming\npm-cache\_logs\2018-09-03T08_52_39_783Z-debug.log