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

Package app for windows #33

Open
ghost opened this issue May 26, 2016 · 10 comments
Open

Package app for windows #33

ghost opened this issue May 26, 2016 · 10 comments

Comments

@ghost
Copy link

ghost commented May 26, 2016

No description provided.

@ghost ghost added the enhancement label May 27, 2016
@MrBlenny
Copy link

I'm trying to run npm pack on windows but i'm getting an error:

> [email protected] build-main C:\Git\timesheets
> cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors && cp app/package.json dist/

3436ms build modules
27ms seal
17ms optimize
18ms hashing
57ms create chunk assets
6440ms additional chunk assets
1ms optimize chunk assets
1ms optimize assets
173ms emit
Hash: 9cf171c36a4b82523b9b
Version: webpack 1.13.1
Time: 10176ms
   Asset    Size  Chunks             Chunk Names
index.js  857 kB       0  [emitted]  main
   [0] multi main 40 bytes {0} [built]
       factory:0ms building:1ms = 1ms
    + 1025 hidden modules

WARNING in ./app/~/encoding/lib/iconv-loader.js
Critical dependencies:
9:12-34 the request of a dependency is an expression
 @ ./app/~/encoding/lib/iconv-loader.js 9:12-34

> [email protected] build-renderer C:\Git\timesheets
> cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.production.js --progress --profile --colors && cp -R app/renderer/assets dist/renderer

7584ms build modules
22ms seal
72ms optimize
38ms hashing
88ms create chunk assets
15316ms additional chunk assets
1ms optimize chunk assets
1ms optimize assets
182ms emit
Hash: e64d11543d313eb2b61a
Version: webpack 1.13.1
Time: 23311ms
            Asset     Size  Chunks             Chunk Names
    main/index.js  1.23 MB       0  [emitted]  main
 menubar/index.js  1.01 MB       1  [emitted]  menubar
   main/style.css   427 kB       0  [emitted]  main
menubar/style.css   426 kB       1  [emitted]  menubar
   [0] multi menubar 40 bytes {1} [built]
       factory:0ms building:1ms dependencies:75ms = 76ms
   [0] multi main 40 bytes {0} [built]
       factory:0ms building:1ms = 1ms
    + 1290 hidden modules

WARNING in ./app/~/encoding/lib/iconv-loader.js
Critical dependencies:
9:12-34 the request of a dependency is an expression
 @ ./app/~/encoding/lib/iconv-loader.js 9:12-34
Child extract-text-webpack-plugin:
        + 8 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
'.' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\david\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "pack"
npm ERR! node v6.2.1
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] pack: `npm run build && ./node_modules/.bin/build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pack script 'npm run build && ./node_modules/.bin/build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Timesheets package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build && ./node_modules/.bin/build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs Timesheets
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls Timesheets
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Git\timesheets\npm-debug.log

Any ideas?

@ghost
Copy link
Author

ghost commented Jul 21, 2016

I've not had the chance to build this on a windows machine yet. Can you run npm run build without a problem?
What about npm run dev? Any issues?

@MrBlenny
Copy link

Yep, npm run build and npm run dev work fine.
I'm trying to compile the app for Linux, Windows and OS X. I know this sort of compilation works in the https://github.com/chentsulin/electron-react-boilerplate with npm run package-all. Has that build process been completely removed?

@ghost
Copy link
Author

ghost commented Jul 22, 2016

Yes, I've started using https://github.com/electron-userland/electron-builder instead. I'm a little tied up at work at the moment. Please let me know if you find anything on there.

@MrBlenny
Copy link

I've got it compiling the .exe. I was unfamiliar with electron builder so it took a while.

I set up a script as follows:

"use strict"

const builder = require("electron-builder")
const Platform = builder.Platform

builder.build({
  targets: Platform.WINDOWS.createTarget(),
  devMetadata: {
    "//": "build and other properties, see https://goo.gl/5jVxoO"
  }
})

Running that produces a packaged .exe in timesheets\release\win\Timesheets Setup 1.3.0.exe. This works perfectly on Windows 10 :)

@ghost
Copy link
Author

ghost commented Jul 25, 2016

Great stuff, will give this a go after work. https://github.com/hardchor/timesheets/blob/master/package.json#L98-L120 is where the build config currently lives.

@ghost
Copy link
Author

ghost commented Aug 8, 2016

Hey @MrBlenny ! I've still not had the chance to test this on an actual Windows machine. Did you manage to get your solution working in the build process?

@MrBlenny
Copy link

MrBlenny commented Aug 9, 2016

I got it working with the script posted above.

@hardchor
Copy link
Owner

note to self: Check https://github.com/electron-userland/electron-builder/wiki/Options#buildwin to build locally, check out AppVeyor for production build

@Spenhouet
Copy link

I can't even do yarn install after cloning this repro on Windows.
I get an infinite stack trace (doesn't stop throwing errors).

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

3 participants