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

"Report an Issue" throws error in dist #304

Closed
ungoldman opened this issue Feb 22, 2018 · 6 comments
Closed

"Report an Issue" throws error in dist #304

ungoldman opened this issue Feb 22, 2018 · 6 comments
Labels

Comments

@ungoldman
Copy link
Member

ungoldman commented Feb 22, 2018

screen shot 2018-02-22 at 3 43 09 pm

Looks like pkg.bugs.url (from package.json) isn't there in the packaged build.

The link above it ("Learn More"), which links to pkg.homepage, works fine.

Offending line:

click () { shell.openExternal(pkg.bugs.url) }

@ungoldman ungoldman added the bug label Feb 22, 2018
@ungoldman
Copy link
Member Author

Maybe electron-builder is stripping some properties from package.json during build?

@ungoldman
Copy link
Member Author

Yep, here's the packaged package.json:

{
  "name": "hyperamp",
  "description": "Indescribable music player",
  "version": "0.5.10",
  "author": "Hypermodules (https://github.com/hypermodules)",
  "browserify": {
    "transform": [
      "envify",
      "yo-yoify",
      "electron-renderify"
    ]
  },
  "dependencies": {
    "@bret/truthy": "^1.0.1",
    "bl": "^1.2.1",
    "choo": "^6.0.0",
    "choo-devtools": "^2.1.0",
    "classnames": "^2.2.5",
    "content-addressable-blob-store": "^4.5.1",
    "csjs-inject": "^1.0.1",
    "electron-context-menu": "^0.9.0",
    "electron-debug": "^1.4.0",
    "electron-default-menu": "^1.0.1",
    "electron-ipc-log": "^3.0.0",
    "electron-is-dev": "^0.3.0",
    "electron-log": "^2.2.12",
    "electron-store": "^1.1.0",
    "electron-updater": "2.20.1",
    "electron-window-state": "^4.0.2",
    "entypo": "^2.1.0",
    "existy": "^1.0.1",
    "file-url": "^2.0.2",
    "flush-write-stream": "^1.0.2",
    "folder-walker": "^3.0.0",
    "format-duration": "^1.0.0",
    "fy-shuffle": "^1.0.0",
    "global": "^4.3.2",
    "lodash.debounce": "^4.0.8",
    "lodash.get": "^4.4.2",
    "lodash.throttle": "^4.1.1",
    "mkdirp": "^0.5.1",
    "mousetrap": "^1.6.1",
    "music-metadata": "^0.9.2",
    "nanobus": "^4.1.0",
    "nanocomponent": "^6.0.0",
    "nanologger": "^1.3.0",
    "nanotick": "^1.1.6",
    "pump": "^3.0.0",
    "raven": "^2.2.1",
    "raven-js": "^3.19.1",
    "run-parallel": "^1.1.6",
    "through2-filter": "^2.0.0",
    "xtend": "^4.0.1"
  },
  "engines": {
    "npm": ">=5.0.0",
    "yarn": ">=1.0.0"
  },
  "homepage": "https://github.com/hypermodules/hyperamp",
  "license": "GPL-3.0",
  "main": "main/index.js",
  "productName": "Hyperamp",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/hypermodules/hyperamp.git"
  }

No bugs property.

So either we manually paste those links into the help menu, or we come up with some programmatic way to extract those from package.json at build time (maybe with browserify).

I'm okay with pasting as a quick fix. Thoughts @bcomnes?

@bcomnes
Copy link
Contributor

bcomnes commented Feb 22, 2018

Pasting is fine, but buhhh why would builder touch that?

@ungoldman
Copy link
Member Author

ungoldman commented Feb 23, 2018

Looks like this got changed in electron-builder in the three days ago:

electron-userland/electron-builder@58933e0#diff-6b18cf4086f516b18d83e6960409d73cR78

Related issue: electron-userland/electron-builder#2606

@ungoldman
Copy link
Member Author

So looks like this has been resolved by a later version of electron-builder:

https://github.com/electron-userland/electron-builder/releases/tag/v20.0.7

But I know they move fast and are not afraid of introducing breaking changes... not sure what version we're currently using, will take a look and see if I can fix this now.

@ungoldman
Copy link
Member Author

Fixed in #305. Release pending.

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

No branches or pull requests

2 participants