Skip to content
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

Build Linux App failed because of dist/favicon doesn't exist #91

Closed
stalina opened this issue Dec 11, 2017 · 2 comments
Closed

Build Linux App failed because of dist/favicon doesn't exist #91

stalina opened this issue Dec 11, 2017 · 2 comments

Comments

@stalina
Copy link
Contributor

stalina commented Dec 11, 2017

Hello,

I tried to build a linux app using the repo "out of the box" but it failed with the error :

Icon set directory .../angular-electron/dist/favicon doesn't exist

Steps to reproduce :

  1. clone repo
  2. npm install
  3. npm run electron:linux

Reproduced on Unbuntu 17.10 and MacOs

Has anyone faced the same problem ?
Thanks

Here is some more logs if needed :

> npm run build:prod && npx electron-builder build --linux


> [email protected] build:prod ../angular-electron
> cross-env NODE_ENV=production npm run build


> [email protected] build ../angular-electron
> webpack --display-error-details && npm run build:electron:main

Hash: 24894d32b7d55b7cfe2b                                                              
Version: webpack 3.8.1
Time: 40959ms
                    Asset       Size     Chunks                    Chunk Names
    assets/background.jpg     232 kB             [emitted]         
src/assets/background.jpg     232 kB             [emitted]         
           main.bundle.js    8.02 kB       main  [emitted]         main
      polyfills.bundle.js    91.1 kB  polyfills  [emitted]         polyfills
         styles.bundle.js    6.35 kB     styles  [emitted]         styles
         vendor.bundle.js     950 kB     vendor  [emitted]  [big]  vendor
         inline.bundle.js    1.37 kB     inline  [emitted]         inline
      assets/i18n/en.json   78 bytes             [emitted]         
             favicon.icns    85.7 kB             [emitted]         
              favicon.ico    16.2 kB             [emitted]         
              favicon.png    14.4 kB             [emitted]         
             ./index.html  617 bytes             [emitted]         
[./node_modules/css-loader/index.js?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib/index.js?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss] ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss 302 bytes {styles} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 488 bytes {polyfills} {vendor} [built]
[./src/$$_lazy_route_resource lazy recursive] ./src/$$_lazy_route_resource lazy 160 bytes {main} [built]
[./src/app/app-routing.module.ts] ./src/app/app-routing.module.ts 1.15 kB {main} [built]
[./src/app/app.component.scss] ./src/app/app.component.scss 245 bytes {main} [built]
   [0] multi ./src/main.ts 28 bytes {main} [built]
[./src/app/app.component.ts] ./src/app/app.component.ts 1.98 kB {main} [built]
   [1] multi ./src/polyfills.ts 28 bytes {polyfills} [built]
   [2] multi ./src/styles.scss 28 bytes {styles} [built]
[./src/app/app.module.ts] ./src/app/app.module.ts 2.22 kB {main} [built]
[./src/app/providers/electron.service.ts] ./src/app/providers/electron.service.ts 1.39 kB {main} [built]
[./src/environments/index.ts] ./src/environments/index.ts 219 bytes {main} [built]
[./src/main.ts] ./src/main.ts 420 bytes {main} [built]
[./src/polyfills.ts] ./src/polyfills.ts 2.42 kB {main} {polyfills} [built]
[./src/styles.scss] ./src/styles.scss 1.35 kB {styles} [built]
    + 209 hidden modules
Child html-webpack-plugin for "index.html":
     1 asset
    [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 349 bytes {0} [built]

> [email protected] build:electron:main ../angular-electron
> tsc main.ts --outDir dist && copyfiles package.json dist && cd dist && npm install --prod && cd ..

[email protected] ../angular-electron/dist
├── @ngx-translate/[email protected] 
└── @ngx-translate/[email protected] 

electron-builder 19.45.4
Using electron-builder.json configuration file
No native production dependencies
Packaging for linux x64 using electron 1.7.8 to app-builds/linux-unpacked
Unhandled rejection Error: Icon set directory .../angular-electron/dist/favicon doesn't exist
    at ../angular-electron/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:42:17
    at throw (native)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at LinuxTargetHelper.computeDesktopIcons (.../angular-electron/node_modules/electron-builder/out/targets/LinuxTargetHelper.js:88:11)
    at new LinuxTargetHelper (../angular-electron/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:23:23)
    at getHelper (../angular-electron/node_modules/electron-builder/src/linuxPackager.ts:33:18)
    at outDir (../angular-electron/node_modules/electron-builder/src/linuxPackager.ts:62:122)
    at mapper (../angular-electron/node_modules/electron-builder/src/targets/targetFactory.ts:49:16)
    at LinuxPackager.createTargets (../angular-electron/node_modules/electron-builder/src/linuxPackager.ts:62:7)
    at createTargets (../angular-electron/node_modules/electron-builder/src/targets/targetFactory.ts:56:12)
    at ../angular-electron/node_modules/electron-builder/src/packager.ts:290:28
From previous event:
    at Packager.doBuild (../angular-electron/node_modules/electron-builder/out/packager.js:369:11)
    at ../angular-electron/node_modules/electron-builder/src/packager.ts:236:52
    at next (native)
From previous event:
    at Packager.build (../angular-electron/node_modules/electron-builder/out/packager.js:298:11)
    at ../angular-electron/node_modules/electron-builder/src/builder.ts:277:40
    at next (native)
From previous event:
    at build (../angular-electron/node_modules/electron-builder/out/builder.js:63:21)
    at then (../angular-electron/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at Object.args [as handler] (../angular-electron/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at Object.runCommand (../angular-electron/node_modules/electron-builder/node_modules/yargs/lib/command.js:228:22)
    at Object.parseArgs [as _parseArgs] (../angular-electron/node_modules/electron-builder/node_modules/yargs/yargs.js:1013:30)
    at Object.get [as argv] (../angular-electron/node_modules/electron-builder/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (../angular-electron/node_modules/electron-builder/src/cli/cli.ts:43:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.Module.runMain (module.js:604:10)
    at findNodeScript.then.existing (../angular-electron/node_modules/npx/node_modules/libnpx/index.js:268:14)
@stalina
Copy link
Contributor Author

stalina commented Dec 11, 2017

I sumitted a PR : #92

https://www.electron.build/icons

icons for Linux should reference a directory that contains the set of icons with their size in their filename

@maximegris
Copy link
Owner

Merged! Thanks :)

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

No branches or pull requests

2 participants