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-forge-maker-snap doesn't work with latest forge #5078

Closed
mahnunchik opened this issue Jun 17, 2020 · 7 comments
Closed

electron-forge-maker-snap doesn't work with latest forge #5078

mahnunchik opened this issue Jun 17, 2020 · 7 comments
Labels

Comments

@mahnunchik
Copy link
Contributor

  • Version: 22.7.0
  • Electron Version: any
  • Electron Type (current, beta, nightly): any
  • Target: snap

Current electron-forge-maker-snap package doesn't work with latest electron-forge.

An unhandled rejection has occurred inside Forge:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:120:11)
    at Object.resolve (path.js:980:7)
    at buildForge (/home/user/app/node_modules/app-builder-lib/src/forge-maker.ts:16:22)
    at new exports.default (/home/user/app/node_modules/electron-forge-maker-snap/main.js:13:10)
    at _default (/home/user/app/node_modules/@electron-forge/core/src/api/make.ts:128:15)
    at /home/user/app/node_modules/@electron-forge/cli/src/electron-forge-make.ts:44:5 {
  code: 'ERR_INVALID_ARG_TYPE'
}
@stale
Copy link

stale bot commented Aug 16, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Aug 16, 2020
@mahnunchik
Copy link
Contributor Author

IMGP2282-1024x680

@stale stale bot removed the backlog label Aug 16, 2020
@burnhamup
Copy link
Contributor

electron-forge-maker-nsis seems to be having the same problems.

I was able to get past this error by specifying a config key for 'dir', but started running up other errors.

@burnhamup
Copy link
Contributor

Something along the lines of

const MakerBase = require('@electron-forge/maker-base').default;
const buildForge = require('app-builder-lib').buildForge;

Object.defineProperty(exports, "__esModule", {
  value: true
})

class MakerSnap extends MakerBase {

  isSupportedOnCurrentPlatform() {
    return Promise.resolve(true);
  }

  async make(options) {
    return buildForge(options, {linux: [`snap:${options.targetArch}`]})
  }
}

exports.default = MakerSnap;

might work, but I'm not up to speed on how these forge plugins need to be configured.

@stale
Copy link

stale bot commented Nov 14, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Nov 14, 2020
@stale stale bot closed this as completed Nov 22, 2020
@mahnunchik
Copy link
Contributor Author

It is relevant!

@lysnikolaou
Copy link

Hey everyone and thanks for all of your work on this!

Is there any plan of providing maker targets for electron-forge v6? Would a PR implementing something like it be accepted/released?

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

3 participants