question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to publish/build on windows

See original GitHub issue
  • Version: 9.31.1

Node.js version: 12.18.2 (upgraded from 12.13.1 when the issue started)

  • Target: win

When running electronize build /target win, the build errors out with: Unknown argument: .

This started today after upgrading the dotnet electronnet.cli tool from 5.30.1 -> 9.31.1, I was running it most of the day doing builds and then suddenly with the same commands and without code changes, started getting this issue. I uninstalled and reinstalled, and did a clean setup on a new windows install with the same versions I had previously running and got the same issue.

Running the command npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=9.0.3 (notice the period is removed), results in it working correctly. This happens on our code base on multiple machines (including clean installs) and it happened on your https://github.comElectronNET/electron.net-api-demos too.

C:\GIT\electron.net-api-demos>electronize build /target win
Build Electron Application...
Build ASP.NET Core App for win-x64...
Executing dotnet publish in this directory: C:\GIT\electron.net-api-demos\obj\desktop\win
Build ASP.NET Core App for win-x64 under Release-Configuration...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos>dotnet publish -r win-x64 -c "Release" --output "C:\GIT\electron.net-api-demos\obj\desktop\win\bin" /p:PublishReadyToRun=true --self-contained
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
  Determining projects to restore...
  Restored C:\GIT\electron.net-api-demos\ElectronNET-API-Demos\ElectronNET-API-Demos.csproj (in 1.59 sec).

  ElectronNET-API-Demos -> C:\GIT\electron.net-api-demos\ElectronNET-API-Demos\bin\Release\netcoreapp3.1\win-x64\ElectronNET-API-Demos.dll
  ElectronNET-API-Demos -> C:\GIT\electron.net-api-demos\ElectronNET-API-Demos\bin\Release\netcoreapp3.1\win-x64\ElectronNET-API-Demos.Views.dll
  ElectronNET-API-Demos -> C:\GIT\electron.net-api-demos\obj\desktop\win\bin\
C:\GIT\electron.net-api-demos>
Start npm install...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos\obj\desktop\win>npm install --production
npm WARN deprecated tslint@6.1.2: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
added 66 packages from 102 contributors and audited 180 packages in 4.035s
found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
C:\GIT\electron.net-api-demos\obj\desktop\win>
ElectronHostHook handling started...
Build Electron Desktop Application...
Executing electron magic in this directory: C:\GIT\electron.net-api-demos\bin\desktop
Create electron-builder configuration file...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos\obj\desktop\win>node build-helper.js electron.manifest.json
C:\GIT\electron.net-api-demos\obj\desktop\win>
Package Electron App for Platform win...
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\GIT\electron.net-api-demos\obj\desktop\win>npx electron-builder . --config=./bin/electron-builder.json --win --x64 -c.electronVersion=9.0.3
cli.js build
Build
Building:
  --mac, -m, -o, --macos   Build for macOS, accepts target list (see
                           https://goo.gl/5uHuzj).                       [array]
  --linux, -l              Build for Linux, accepts target list (see
                           https://goo.gl/4vwQad)                        [array]
  --win, -w, --windows     Build for Windows, accepts target list (see
                           https://goo.gl/jYsTEJ)                        [array]
  --x64                    Build for x64                               [boolean]
  --ia32                   Build for ia32                              [boolean]
  --armv7l                 Build for armv7l                            [boolean]
  --arm64                  Build for arm64                             [boolean]
  --dir                    Build unpacked dir. Useful to test.         [boolean]
  --prepackaged, --pd      The path to prepackaged app (to pack in a
                           distributable format)
  --projectDir, --project  The path to project directory. Defaults to current
                           working directory.
  --config, -c             The path to an electron-builder config. Defaults to
                           `electron-builder.yml` (or `json`, or `json5`), see
                           https://goo.gl/YFRJOM
Publishing:
  --publish, -p  Publish artifacts, see https://goo.gl/tSFycD
                [choices: "onTag", "onTagOrDraft", "always", "never", undefined]
Other:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
Examples:
  electron-builder -mwl                     build for macOS, Windows and Linux
  electron-builder --linux deb tar.xz       build deb and tar.xz for Linux
  electron-builder --win --ia32             build for Windows ia32
  electron-builder                          set package.json property `foo` to
  -c.extraMetadata.foo=bar                  `bar`
  electron-builder                          configure unicode options for NSIS
  --config.nsis.unicode=false
Unknown argument: .
C:\GIT\electron.net-api-demos\obj\desktop\win>
... done

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
GregorBiswangercommented, Jul 4, 2020

Hello Community, It is an electron builder problem that has a parameter removed. We got a PR with a solution. I think on Monday version 9.31.2 should be released as soon as possible. Big thanks to @rbaker26 for the PR…

3reactions
zenith6495commented, Jul 4, 2020

I’ve noticed this issue is caused by electron-builder, as electronize build runs npm install electron-builder latest v22.7.0 which does not accept “.” in the command thus causing the issue. If you try to manually install electron-builder v21 or v20 it will build without issue.

Alternatively, author should remove the “.” from the command as well. I don’t know what’s the purpose of including that “.” in the command, can any experienced pros mind sharing? is the “.” for Mac or Linux?

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net - 'Publish failed' but build succeeded?
Mostly, publish failed will be caused by IIS side configuration issue such as authentication setting.... Source link. You can open the output ...
Read more >
Resolved - Publish failed. Check output for more details.
Using Microsoft.WebTools in a forms application? On the drive with your project, open it in visual studio and click build, and clean. Then ......
Read more >
Visual Studio 2019 (enterprise) V 16.8.3 can't publish .NET ...
Visual Studio 2019 (enterprise) V 16.8.3 can't publish .NET web forms app ... When compile web app and go to publish to IIS...
Read more >
Unable to publish single-file application (.NET 5)
1. Close tab publish · 2. Open file "ClickOnceProfile.pubxml", located in Properties\PublishProfiles of project · 3. Make some changes, for ...
Read more >
dotnet publish fails with --output Cannot create/move a file ...
When TeamCity run dotent publish and passing --output it fails 2 times out of 5 with error: "C:\Temp.nuget\packages\microsoft.net.sdk.functions\ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found