New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run package报错 #22

Closed
hze94 opened this Issue Jan 18, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@hze94

hze94 commented Jan 18, 2018

npm run package 报PKG_ARCH is not defined,详细报错信息如下,electron-builder为最新版本

• electron-builder version=19.53.7
• loaded configuration file=package.json ("build" field)
• loaded parent configuration file=D:\Code\xuanxuan\build\electron-builder.json
• writing effective config file=release\electron-builder.yaml
• installing production dependencies platform=win32 arch=x64 appDir=D:\Code\xuanxuan\app
• packaging       platform=win32 arch=x64 electron=1.7.10 appOutDir=release\win-unpacked
Error: Env PKG_ARCH is not defined
  at pattern.replace (D:\Code\xuanxuan\node_modules\electron-builder-lib\src\platformPackager.ts:461:21)
  at String.replace (<anonymous>)
  at WinPackager.expandMacro (D:\Code\xuanxuan\node_modules\electron-builder-lib\src\platformPackager.ts:434:20)
  at WinPackager.computeArtifactName (D:\Code\xuanxuan\node_modules\electron-builder-lib\src\platformPackager.ts:415:17)
  at WinPackager.expandArtifactNamePattern (D:\Code\xuanxuan\node_modules\electron-builder-lib\src\platformPackager.ts:393:17)
  at D:\Code\xuanxuan\node_modules\electron-builder-lib\src\targets\nsis\NsisTarget.ts:116:40
  at Generator.next (<anonymous>)
  at NsisTarget.buildInstaller (D:\Code\xuanxuan\node_modules\electron-builder-lib\out\targets\nsis\NsisTarget.js:336:11)
  at D:\Code\xuanxuan\node_modules\electron-builder-lib\src\targets\nsis\NsisTarget.ts:96:18
From previous event:
  at NsisTarget.buildInstaller (D:\Code\xuanxuan\node_modules\electron-builder-lib\out\targets\nsis\NsisTarget.js:336:11)
  at D:\Code\xuanxuan\node_modules\electron-builder-lib\src\targets\nsis\NsisTarget.ts:96:18
  at Generator.next (<anonymous>)
From previous event:
  at NsisTarget.finishBuild (D:\Code\xuanxuan\node_modules\electron-builder-lib\out\targets\nsis\NsisTarget.js:214:11)
  at D:\Code\xuanxuan\node_modules\electron-builder-lib\src\packager.ts:369:36
  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 Packager.doBuild (D:\Code\xuanxuan\node_modules\electron-builder-lib\out\packager.js:423:11)
  at D:\Code\xuanxuan\node_modules\electron-builder-lib\src\packager.ts:305:52
  at Generator.next (<anonymous>)
  at D:\Code\xuanxuan\node_modules\graceful-fs\graceful-fs.js:99:16
  at D:\Code\xuanxuan\node_modules\graceful-fs\graceful-fs.js:43:10
  at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
  at Packager._build (D:\Code\xuanxuan\node_modules\electron-builder-lib\out\packager.js:367:11)
  at D:\Code\xuanxuan\node_modules\electron-builder-lib\src\packager.ts:267:23
  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 Packager.build (D:\Code\xuanxuan\node_modules\electron-builder-lib\out\packager.js:323:11)
  at D:\Code\xuanxuan\node_modules\electron-builder\src\builder.ts:310:40
  at Generator.next (<anonymous>)
From previous event:
  at _build (D:\Code\xuanxuan\node_modules\electron-builder\out\builder.js:61:21)
  at build (D:\Code\xuanxuan\node_modules\electron-builder\src\builder.ts:280:10)
  at then (D:\Code\xuanxuan\node_modules\electron-builder\src\cli\cli.ts:49:33)
  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] (D:\Code\xuanxuan\node_modules\electron-builder\src\cli\cli.ts:49:33)
  at Object.runCommand (D:\Code\xuanxuan\node_modules\electron-builder\node_modules\yargs\lib\command.js:235:44)
  at Object.parseArgs [as _parseArgs] (D:\Code\xuanxuan\node_modules\electron-builder\node_modules\yargs\yargs.js:1041:24)
  at Object.get [as argv] (D:\Code\xuanxuan\node_modules\electron-builder\node_modules\yargs\yargs.js:957:21)
  at Object.<anonymous> (D:\Code\xuanxuan\node_modules\electron-builder\src\cli\cli.ts:43:15)
  at Module._compile (module.js:643:30)
  at Object.Module._extensions..js (module.js:654:10)
  at Module.load (module.js:556:32)
  at tryModuleLoad (module.js:499:12)
  at Function.Module._load (module.js:491:3)
  at Function.Module.runMain (module.js:684:10)
  at startup (bootstrap_node.js:187:16)
  at bootstrap_node.js:608:3

@catouse catouse added the bug label Feb 24, 2018

catouse added a commit that referenced this issue Mar 6, 2018

@catouse catouse closed this Mar 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment