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.

Empty config in @electron-forge/publisher-nucleus@6.0.0-beta.22

See original GitHub issue

If you check config object assigned in https://github.com/electron-userland/electron-forge/blob/e55a9d5beb666a944ae730e6ed0a2ba6b5594c93/packages/publisher/nucleus/src/PublisherNucleus.ts#L35 it’s empty (regardless of how config declared as manifest block or a separate file) and therefore the fetch function https://github.com/electron-userland/electron-forge/blob/e55a9d5beb666a944ae730e6ed0a2ba6b5594c93/packages/publisher/nucleus/src/PublisherNucleus.ts#L57 receives empty config.host and throws an error (Absolute URL required).

As a dirty workaround I had to do the following, given I have the only publisher:

 async publish({ makeResults, forgeConfig }: PublisherOptions) {
    const config = forgeConfig.publishers[0].config
...

So it publishes correctly to Nucleus server

My env: Windows 10, Node.js 10.4.1

package.json

{
  "name": "test",
  "productName": "test",
  "version": "1.0.0",
  "description": "My Electron application description",
  "main": "src/index.js",
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish --target=@electron-forge/publisher-nucleus",
    "lint": "echo \"No linting configured\""
  },
  "keywords": [],
  "author": "dmitry",
  "license": "MIT",
  "config": {
    "forge": "./forge.config.js"
  },
  "dependencies": {
    "@electron-forge/publisher-nucleus": "^6.0.0-beta.22",
    "electron-squirrel-startup": "^1.0.0"
  },
  "devDependencies": {
    "@electron-forge/cli": "^6.0.0-beta.22",
    "@electron-forge/maker-deb": "^6.0.0-beta.22",
    "@electron-forge/maker-rpm": "^6.0.0-beta.22",
    "@electron-forge/maker-squirrel": "^6.0.0-beta.22",
    "@electron-forge/maker-zip": "^6.0.0-beta.22",
    "electron": "2.0.5"
  }
}

forge.config.js

module.exports = {
  "packagerConfig": {},
      "publishers": [
        {
          "name": "@electron-forge/publisher-nucleus",
          "config": {
            "host": "http://localhost:3030",
            "appId": "2",
            "channelId": "5542496b41ba12ab15a31862d78088f4",
            "token": "TOKEN"
          }
        }
      ],
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "test"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-deb",
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "config": {}
        }
      ]
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Empty Config files - Network Configuration Manager (NCM)
Sometimes one or more config files are empty and thereby different then the existing config. Does anyone have an idea of why I...
Read more >
c# - What causes user.config to empty? And how do I restore ...
I have noticed on a few machines in which my application's user.config file is somehow becoming corrupted and is empty when opening.
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