electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.68k stars 1.74k forks source link

Linux Build (deb) - `homepage` is require #1881

Closed popod closed 7 years ago

popod commented 7 years ago

When building for linux (deb), I get this error:

Building deb
Error: Please specify project homepage, see https://github.com/electron-userland/electron-builder/wiki/Options#Metadata-homepage
    at /rootPath/node_modules/electron-builder/src/targets/fpm.ts:93:13
    at Generator.next (<anonymous>)

But my package.json is set with

{
  "name": "projectname",
  "version": "0.1.0",
  "description": "projectDescription",
  "homepage": "https://www.mysite.com",
  ...

Do I a mistake or is it a bug ?

develar commented 7 years ago

Please set env DEBUG=electron-builder and attach log of the terminal output.

popod commented 7 years ago

Here are the logs. But I've found the error.. This is because I user 2 package.json structure and that I set homepage only to the one at root path ! Perhaps you could display a better error message ?

electron-builder 19.16.3
  electron-builder Effective config:
  electron-builder productName: projectname
  electron-builder publish:
  electron-builder   - provider: generic
  electron-builder     url: 'https://www.projectname.ch/${os}'
  electron-builder appId: com.projectname.app
  electron-builder dmg:
  electron-builder   contents:
  electron-builder     - x: 410
  electron-builder       'y': 150
  electron-builder       type: link
  electron-builder       path: /Applications
  electron-builder     - x: 130
  electron-builder       'y': 150
  electron-builder       type: file
  electron-builder files:
  electron-builder   - dist/
  electron-builder   - node_modules/
  electron-builder   - package.json
  electron-builder mac:
  electron-builder   category: public.app-category.medical
  electron-builder   icon: app/icons/icon.icns
  electron-builder win:
  electron-builder   icon: app/icons/icon.ico
  electron-builder linux:
  electron-builder   target:
  electron-builder     - deb
  electron-builder  +0ms
  electron-builder Two package.json structure is used (dev: /basePath/package.json, app: /basePath/app/package.json) +252ms
Rebuilding native production dependencies for linux:x64
  electron-builder Spawning /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js rebuild keytar keytar-prebuild +605ms

> keytar@4.0.3 install /basePath/app/node_modules/keytar
> node-gyp rebuild

  CXX(target) Release/obj.target/keytar/src/async.o
  CXX(target) Release/obj.target/keytar/src/main.o
  CXX(target) Release/obj.target/keytar/src/keytar_mac.o
  SOLINK_MODULE(target) Release/keytar.node

> keytar-prebuild@4.0.3 install /basePath/app/node_modules/keytar-prebuild
> prebuild-install || node-gyp rebuild

prebuild-install info begin Prebuild-install version 2.2.1
prebuild-install info looking for local prebuild @ prebuilds/keytar-prebuild-v4.0.3-electron-v54-linux-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/username/.npm/_prebuilds/https-github.com-electron-userland-electron-builder-binaries-releases-download-v4.0.3-keytar-prebuild-v4.0.3-electron-v54-linux-x64.tar.gz
prebuild-install info found cached prebuild 
prebuild-install info unpacking @ /Users/username/.npm/_prebuilds/https-github.com-electron-userland-electron-builder-binaries-releases-download-v4.0.3-keytar-prebuild-v4.0.3-electron-v54-linux-x64.tar.gz
prebuild-install info unpack resolved to /basePath/app/node_modules/keytar-prebuild/build/Release/keytar.node
prebuild-install info install Successfully installed prebuilt binary!
keytar@4.0.3 /basePath/app/node_modules/keytar
keytar-prebuild@4.0.3 /basePath/app/node_modules/keytar-prebuild
  electron-builder /usr/local/bin/node (1991) exited with exit code 0 +4s
Packaging for linux x64 using electron 1.7.5 to dist/linux-unpacked
  electron-builder Executing iconutil --convert iconset --output /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset /basePath/app/icons/icon.icns +171ms
  electron-builder Executing sips --resampleHeightWidth 24 24 /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_512x512.png --out /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_24x24.png +83ms
  electron-builder Executing sips --resampleHeightWidth 96 96 /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_512x512.png --out /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_96x96.png +4ms
  electron-builder Executing sips --resampleHeightWidth 64 64 /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_512x512.png --out /var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_64x64.png +5ms
  electron-builder /private/var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_512x512.png
  electron-builder   /private/var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_24x24.png
  electron-builder  +13ms
  electron-builder /private/var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_512x512.png
  electron-builder   /private/var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_96x96.png
  electron-builder  +3ms
  electron-builder /private/var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_512x512.png
  electron-builder   /private/var/folders/g7/5y2hqvns10l1v_zz8kvglwmr0000gn/T/electron-builder-la7vld/0-1-linux.iconset/icon_64x64.png
  electron-builder  +5ms
  electron-builder Spawning /basePath/node_modules/7zip-bin-mac/7za x -bd /Users/username/Library/Caches/electron/electron-v1.7.5-linux-x64.zip -o/basePath/dist/linux-unpacked +161ms

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)

Scanning the drive for archives:
1 file, 51172535 bytes (49 MiB)

Extracting archive: /Users/username/Library/Caches/electron/electron-v1.7.5-linux-x64.zip
--
Path = /Users/username/Library/Caches/electron/electron-v1.7.5-linux-x64.zip
Type = zip
Physical Size = 51172535

Everything is Ok

Files: 71
Size:       134329626
Compressed: 51172535
  electron-builder /basePath/node_modules/7zip-bin-mac/7za (2199) exited with exit code 0 +1s
  electron-builder File patterns of first/default matcher:
  electron-builder  node_modules/**/*
  electron-builder  !dist{,/**/*}
  electron-builder  dist/
  electron-builder  node_modules/
  electron-builder  package.json
  electron-builder  !**/node_modules/**/*.{dll,exe}
  electron-builder  !**/node_modules/*/{README.md,karma.conf.js,.coveralls.yml,readme.markdown,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples}
  electron-builder  !**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj,cc,obj,pdb,h}
  electron-builder  !**/._*
  electron-builder  !**/electron-builder.{yaml,yml,json,json5,toml}
  electron-builder  !**/{.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore,.idea,.vs,.editorconfig,.flowconfig,.jshintrc,.eslintrc,.yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log,appveyor.yml,.travis.yml,circle.yml,.nyc_output} +8ms
  electron-builder Production dependencies in the /basePath/app: acorn, amdefine, argparse, ast-types, async, babel-runtime, base62, base64-xor, binary-search-tree, bluebird, bluebird-lst, cli-table, colors, commander, core-js, core-util-is, csvtojson, debug, decompress-response, duplexer3, electron-builder-http, electron-is-dev, electron-updater, electron-updater/node_modules/electron-is-dev, es3ify, es3ify/node_modules/esprima-fb, es6-promise, esmangle-evaluator, esprima, falafel, falafel/node_modules/isarray, first-chunk-stream, flat, foreach, fs-extra, fs-extra-p, get-stream, got, graceful-fs, hammerjs, has-symbol-support-x, has-to-string-tag-x, iconv-lite, immediate, inherits, inline-process-browser, is-buffer, is-object, is-plain-obj, is-retry-allowed, is-stream, is-utf8, isarray, isurl, jquery, js-yaml, json2csv, jsonfile, jstransform, jstransform/node_modules/esprima-fb, jstransform/node_modules/source-map, jszip, jszip/node_modules/core-js, keytar, keytar-prebuild, lie, localforage, localforage/node_modules/lie, lodash, lodash.clonedeep, lodash.flatten, lodash.get, lodash.isequal, lodash.set, lodash.uniq, lowercase-keys, macaddress, materialize-css, mimic-response, mkdirp, mkdirp/node_modules/minimist, moment, ms, nedb, object-keys, p-cancelable, p-finally, p-timeout, pako, path-is-absolute, prepend-http, private, process-nextick-args, ramda, readable-stream, recast, recast/node_modules/esprima-fb, regenerator-runtime, safe-buffer, sax, semver, source-map, source-map-support, sprintf-js, string_decoder, strip-bom, through, through2, through2/node_modules/isarray, through2/node_modules/readable-stream, timed-out, underscore, universalify, unreachable-branch-transform, url-parse-lax, url-to-options, util-deprecate, uuid, uuid-1345, vee-validate, vue, vue-electron, vue-localstorage, vue-moment, vue-multiselect, vue-resource, vue-router, vuex, xelement, xtend +29ms
Building deb
  electron-builder Async task error: Error: Please specify project homepage, see https://github.com/electron-userland/electron-builder/wiki/Options#Metadata-homepage
  electron-builder     at /basePath/node_modules/electron-builder/src/targets/fpm.ts:93:13
  electron-builder     at Generator.next (<anonymous>)
  electron-builder From previous event:
  electron-builder     at FpmTarget.build (/basePath/node_modules/electron-builder/out/targets/fpm.js:256:11)
  electron-builder     at default.each.it (/basePath/node_modules/electron-builder/src/platformPackager.ts:106:87)
  electron-builder From previous event:
  electron-builder     at taskManager.addTask.default.map.then (/basePath/node_modules/electron-builder/src/platformPackager.ts:106:35)
  electron-builder From previous event:
  electron-builder     at LinuxPackager.packageInDistributableFormat (/basePath/node_modules/electron-builder/src/platformPackager.ts:106:8)
  electron-builder     at /basePath/node_modules/electron-builder/src/platformPackager.ts:101:10
  electron-builder From previous event:
  electron-builder     at LinuxPackager.pack (/basePath/node_modules/electron-builder/out/platformPackager.js:171:11)
  electron-builder     at /basePath/node_modules/electron-builder/src/packager.ts:244:24
  electron-builder From previous event:
  electron-builder     at Packager.doBuild (/basePath/node_modules/electron-builder/out/packager.js:317:11)
  electron-builder     at /basePath/node_modules/electron-builder/src/packager.ts:175:52
  electron-builder     at Generator.next (<anonymous>)
  electron-builder     at runCallback (timers.js:781:20)
  electron-builder     at tryOnImmediate (timers.js:743:5)
  electron-builder     at processImmediate [as _immediateCallback] (timers.js:714:5)
  electron-builder From previous event:
  electron-builder     at Packager.build (/basePath/node_modules/electron-builder/out/packager.js:236:11)
  electron-builder     at /basePath/node_modules/electron-builder/src/builder.ts:266:40
  electron-builder     at Generator.next (<anonymous>)
  electron-builder     at build (/basePath/node_modules/electron-builder/out/builder.js:69:21)
  electron-builder     at Object.args [as handler] (/basePath/node_modules/electron-builder/src/cli/cli.ts:46:4)
  electron-builder     at Object.self.runCommand (/basePath/node_modules/yargs/lib/command.js:233:22)
  electron-builder     at Object.Yargs.self._parseArgs (/basePath/node_modules/yargs/yargs.js:1018:24)
  electron-builder     at Object.get [as argv] (/basePath/node_modules/yargs/yargs.js:927:19)
  electron-builder     at Object.<anonymous> (/basePath/node_modules/electron-builder/src/cli/cli.ts:41:15)
  electron-builder From previous event:
  electron-builder     at build (/basePath/node_modules/electron-builder/out/builder.js:69:21)
  electron-builder     at Object.args [as handler] (/basePath/node_modules/electron-builder/out/cli/cli.js:121:9)
  electron-builder     at Object.self.runCommand (/basePath/node_modules/yargs/lib/command.js:233:22)
  electron-builder     at Object.Yargs.self._parseArgs (/basePath/node_modules/yargs/yargs.js:1018:24)
  electron-builder     at Object.get [as argv] (/basePath/node_modules/yargs/yargs.js:927:19)
  electron-builder     at Object.<anonymous> (/basePath/node_modules/electron-builder/out/cli/cli.js:117:465)
  electron-builder     at Module._compile (module.js:569:30)
  electron-builder     at Object.Module._extensions..js (module.js:580:10)
  electron-builder     at Module.load (module.js:503:32)
  electron-builder     at tryModuleLoad (module.js:466:12)
  electron-builder     at Function.Module._load (module.js:458:3)
  electron-builder     at Function.Module.runMain (module.js:605:10)
  electron-builder     at startup (bootstrap_node.js:158:16)
  electron-builder     at bootstrap_node.js:575:3 +8s
Error: Please specify project homepage, see https://github.com/electron-userland/electron-builder/wiki/Options#Metadata-homepage
    at /basePath/node_modules/electron-builder/src/targets/fpm.ts:93:13
    at Generator.next (<anonymous>)
From previous event:
    at FpmTarget.build (/basePath/node_modules/electron-builder/out/targets/fpm.js:256:11)
    at default.each.it (/basePath/node_modules/electron-builder/src/platformPackager.ts:106:87)
From previous event:
    at taskManager.addTask.default.map.then (/basePath/node_modules/electron-builder/src/platformPackager.ts:106:35)
From previous event:
    at LinuxPackager.packageInDistributableFormat (/basePath/node_modules/electron-builder/src/platformPackager.ts:106:8)
    at /basePath/node_modules/electron-builder/src/platformPackager.ts:101:10
From previous event:
    at LinuxPackager.pack (/basePath/node_modules/electron-builder/out/platformPackager.js:171:11)
    at /basePath/node_modules/electron-builder/src/packager.ts:244:24
From previous event:
    at Packager.doBuild (/basePath/node_modules/electron-builder/out/packager.js:317:11)
    at /basePath/node_modules/electron-builder/src/packager.ts:175:52
    at Generator.next (<anonymous>)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Packager.build (/basePath/node_modules/electron-builder/out/packager.js:236:11)
    at /basePath/node_modules/electron-builder/src/builder.ts:266:40
    at Generator.next (<anonymous>)
    at build (/basePath/node_modules/electron-builder/out/builder.js:69:21)
    at Object.args [as handler] (/basePath/node_modules/electron-builder/src/cli/cli.ts:46:4)
    at Object.self.runCommand (/basePath/node_modules/yargs/lib/command.js:233:22)
    at Object.Yargs.self._parseArgs (/basePath/node_modules/yargs/yargs.js:1018:24)
    at Object.get [as argv] (/basePath/node_modules/yargs/yargs.js:927:19)
    at Object.<anonymous> (/basePath/node_modules/electron-builder/src/cli/cli.ts:41:15)
From previous event:
    at build (/basePath/node_modules/electron-builder/out/builder.js:69:21)
    at Object.args [as handler] (/basePath/node_modules/electron-builder/out/cli/cli.js:121:9)
    at Object.self.runCommand (/basePath/node_modules/yargs/lib/command.js:233:22)
    at Object.Yargs.self._parseArgs (/basePath/node_modules/yargs/yargs.js:1018:24)
    at Object.get [as argv] (/basePath/node_modules/yargs/yargs.js:927:19)
    at Object.<anonymous> (/basePath/node_modules/electron-builder/out/cli/cli.js:117:465)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! projectname@0.1.0 build:linux: `npm run pack && DEBUG=electron-builder build -l`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the projectname@0.1.0 build:linux 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!     /Users/username/.npm/_logs/2017-08-03T09_14_22_510Z-debug.log