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

electron-builder on Windows OS #296

Closed
vanowm opened this issue Feb 14, 2021 · 4 comments
Closed

electron-builder on Windows OS #296

vanowm opened this issue Feb 14, 2021 · 4 comments

Comments

@vanowm
Copy link

vanowm commented Feb 14, 2021

Following installation instructions via yarn add electron-builder --dev will add electron-builder into node_modules of the package, not as system executable. Because of that yarn dist script fails, since it assumes electron-builder is installed into system.
So wouldn't it make sense to use electron-builder that comes with the package instead?

    "dist": "yarn build && ./node_modules/.bin/electron-builder --config electron-builder.js",
@OrangeDrangon
Copy link
Owner

It does not assume it is available system wide. yarn looks in node_modules when inside of an npm script. The problem is probably that you are not using a unix compatible shell and the && symbol is not supported. If you have an actual error message I will work with you to resolve the problem.

@vanowm
Copy link
Author

vanowm commented Feb 16, 2021

I'm using PowerShell (CMD has same issue). The && seem to work when I change script to use relative path as above.
No errors shown, it simply opens electron-builder.js in text editor:

> yarn dist
yarn run v1.22.5
$ yarn build && electron-builder --config electron-builder.js
$ webpack --mode=production
(node:1232) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\Users\Vano\Downloads\Android_Messages\node_modules\postcss\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:1232) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
        Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
        Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
app:
  asset background.js 22.8 KiB [emitted] [minimized] (name: background) 1 related asset
  asset bridge.js 18.7 KiB [emitted] [minimized] (name: bridge) 1 related asset
  asset app.js 6.46 KiB [emitted] [minimized] (name: app) 1 related asset
  asset index.html 260 bytes [emitted]
  orphan modules 54.3 KiB [orphan] 29 modules
  runtime modules 1.92 KiB 9 modules
  built modules 111 KiB [built]
    cacheable modules 13.5 KiB
      modules by path ./node_modules/ 10.4 KiB
        ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js 6.67 KiB [built] [code generated]
        ./node_modules/css-loader/dist/runtime/cssWithMappingToString.js 2.21 KiB [built] [code generated]
        ./node_modules/css-loader/dist/runtime/api.js 1.57 KiB [built] [code generated]
      ./package.json 1.76 KiB [built] [code generated]
      ./node_modules/css-loader/dist/cjs.js!./src/stylesheets/main.css 1.31 KiB [built] [code generated]
    ./src/background.ts + 25 modules 50.5 KiB [not cacheable] [built] [code generated]
    ./src/app.ts + 5 modules 3.44 KiB [not cacheable] [built] [code generated]
    ./src/bridge.ts + 9 modules 43.1 KiB [not cacheable] [built] [code generated]
    external "uuid" 42 bytes [built] [code generated]
  app (webpack 5.17.0) compiled successfully in 4063 ms
Done in 7.07s.```

@OrangeDrangon
Copy link
Owner

I have diagnosed the issue in a VM and can push a change soon.

@vanowm
Copy link
Author

vanowm commented Feb 19, 2021

This did not make any difference, it still trying execute system wide electron-builder, which doesn't exist on Windows.

OrangeDrangon added a commit that referenced this issue Feb 20, 2021
needs the extra yarn in the package command for unknown reasons.

webpack and png2icons works fine without it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants