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/publisher-electron maker.clone is not a function #3547

Open
3 tasks done
jdev082 opened this issue Mar 23, 2024 · 1 comment
Open
3 tasks done

@electron-forge/publisher-electron maker.clone is not a function #3547

jdev082 opened this issue Mar 23, 2024 · 1 comment

Comments

@jdev082
Copy link

jdev082 commented Mar 23, 2024

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.3.1

Electron version

29.1.5

Operating system

GitHub actions: macos-latest (macOS 12), windows-latest (Windows 2022 runner image), ubuntu-latest (22.04)

Last known working Electron Forge version

Last known release used a mix of v6.4.2 and v6.2.1. The latter being the version of both publisher-github and maker-rpm

Expected behavior

The release be built successfully and a release created.

Actual behavior


Run npm run publish

> catalyst@3.6.0-beta.8 publish
> electron-forge publish

[STARTED] Checking your system
[STARTED] Checking git exists
[STARTED] Checking node version
[STARTED] Checking packageManager version
[TITLE] Found git@2.43.2
[SUCCESS] Found git@2.43.2
[TITLE] Found node@16.20.2
[SUCCESS] Found node@16.20.2
[TITLE] Found npm@8.19.4
[SUCCESS] Found npm@8.19.4
[SUCCESS] Checking your system
[STARTED] Loading configuration
[SUCCESS] Loading configuration
[STARTED] Resolving publish targets
[DATA] Publishing to the following targets: github
[SUCCESS] Resolving publish targets
[STARTED] Running make command
[STARTED] Loading configuration
[SUCCESS] Loading configuration
[STARTED] Resolving make targets
[DATA] Making for the following targets: , , 
[SUCCESS] Resolving make targets
[STARTED] Running package command
[STARTED] Preparing to package application
[SUCCESS] Preparing to package application
[STARTED] Running packaging hooks
[STARTED] Running generateAssets hook
[SUCCESS] Running generateAssets hook
[STARTED] Running prePackage hook
[SUCCESS] Running prePackage hook
[SUCCESS] Running packaging hooks
[STARTED] Packaging application
[DATA] Determining targets...
[STARTED] Packaging for x64 on linux
[STARTED] Copying files
[SUCCESS] Copying files
[STARTED] Preparing native dependencies
[TITLE] Preparing native dependencies
[SUCCESS] Preparing native dependencies
[STARTED] Finalizing package
[SUCCESS] Finalizing package
[SUCCESS] Packaging for x64 on linux
[SUCCESS] Packaging application
[STARTED] Running postPackage hook
[SUCCESS] Running postPackage hook
[SUCCESS] Running package command
[STARTED] Running preMake hook
[SUCCESS] Running preMake hook
[STARTED] Making distributables
[FAILED] maker.clone is not a function
[FAILED] maker.clone is not a function

An unhandled rejection has occurred inside Forge:
TypeError: maker.clone is not a function
at /home/runner/work/Catalyst/Catalyst/node_modules/@electron-forge/core/dist/api/make.js:120:45
    at /home/runner/work/Catalyst/Catalyst/node_modules/@electron-forge/core/dist/api/make.js:181:43
    at async Task.task (/home/runner/work/Catalyst/Catalyst/node_modules/@electron-forge/tracer/dist/index.js:58:20)
    at async Task.run (/home/runner/work/Catalyst/Catalyst/node_modules/listr2/dist/index.cjs:978:11)
    at async /home/runner/work/Catalyst/Catalyst/node_modules/p-map/index.js:57:22
Error: Process completed with exit code 1.

Build fails and stops action

Steps to reproduce

Attempt to build release through GitHub actions with latest Electron Forge version.

Additional information

Project in question: https://github.com/CatalystDevOrg/Catalyst
package.json for last working build: https://github.com/CatalystDevOrg/Catalyst/blob/v4.0.0-beta.3/package.json
package.json latest: https://github.com/CatalystDevOrg/Catalyst/blob/develop/package.json
GitHub action file: https://github.com/CatalystDevOrg/Catalyst/blob/develop/.github/workflows/build.yml

The only changes to the build system were updates to Electron Forge's packages. Dependencies are readily updated during development of new releases.

Individual build attempts can be investigated at https://github.com/CatalystDevOrg/Catalyst/actions/workflows/build.yml

Here's a summary of the above files:

Electron Forge versions of last working build:

        "@electron-forge/cli": "^7.2.0",
        "@electron-forge/maker-deb": "^7.2.0",
        "@electron-forge/maker-dmg": "^7.2.0",
        "@electron-forge/maker-rpm": "^7.2.0",
        "@electron-forge/maker-squirrel": "^7.2.0",
        "@electron-forge/maker-zip": "^7.2.0",
        "@electron-forge/publisher-github": "^7.2.0",
        "electron-forge-maker-appimage": "trusktr/electron-forge-maker-appimage#patch-1"

Electron forge versions of develop:

        "@electron-forge/cli": "^7.3.1",
        "@electron-forge/maker-deb": "^7.3.1",
        "@electron-forge/maker-dmg": "^7.3.1",
        "@electron-forge/maker-rpm": "^7.3.1",
        "@electron-forge/maker-squirrel": "^7.3.1",
        "@electron-forge/maker-zip": "^7.3.1",
        "@electron-forge/publisher-github": "^7.3.1",
        "electron-forge-maker-appimage": "trusktr/electron-forge-maker-appimage#patch-1"

Electron Forge config:

    "config": {
        "forge": {
            "packagerConfig": {
                "icon": "./assets/icon-scaled",
                "asar": true,
                "ignore": [
                    "contributing.md",
                    ".gitignore",
                    ".eslintrc.json",
                    "pnpm-lock.yaml",
                    "README.md",
                    "tailwind.config.js",
                    "CODE_OF_CONDUCT.md",
                    ".pnpm-debug.log",
                    ".github",
                    ".vscode",
                    "styles.css",
                    "banner.svg"
                ]
            },
            "publishers": [
                {
                    "name": "@electron-forge/publisher-github",
                    "config": {
                        "repository": {
                            "owner": "CatalystDevOrg",
                            "name": "Catalyst"
                        },
                        "draft": true
                    }
                }
            ],
            "makers": [
                {
                    "name": "@electron-forge/maker-squirrel",
                    "config": {
                        "name": "Catalyst3"
                    }
                },
                {
                    "name": "@electron-forge/maker-zip",
                    "platforms": [
                        "darwin"
                    ]
                },
                {
                    "name": "@electron-forge/maker-dmg",
                    "config": {
                        "format": "ULFO"
                    }
                },
                {
                    "name": "@electron-forge/maker-deb",
                    "config": {
                        "options": {
                            "name": "Catalyst3",
                            "genericName": "Web Browser",
                            "maintainer": "CatalystDevOrg",
                            "icon": "./assets/icon.png",
                            "categories": [
                                "Network",
                                "Utility"
                            ]
                        }
                    }
                },
                {
                    "name": "@electron-forge/maker-rpm",
                    "config": {
                        "options": {
                            "name": "Catalyst3",
                            "genericName": "Web Browser",
                            "maintainer": "CatalystDevOrg",
                            "icon": "./assets/icon.png",
                            "categories": [
                                "Network",
                                "Utility"
                            ]
                        }
                    }
                },
                {
                    "name": "electron-forge-maker-appimage",
                    "targetArch": "x64"
                }
            ]
        }
    }
}
@jdev082
Copy link
Author

jdev082 commented Mar 23, 2024

The same issue occurs when attempting to build on my system:

> catalyst@3.6.0-beta.8 make
> electron-forge make

✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: , , 
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
  ✔ Packaging application
    ✔ Packaging for x64 on linux [9s]
  ✔ Running postPackage hook
✔ Running preMake hook
✖ Making distributables
  › maker.clone is not a function
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
TypeError: maker.clone is not a function
at /home/user/Projects/Catalyst/node_modules/@electron-forge/core/dist/api/make.js:120:45
    at /home/user/Projects/Catalyst/node_modules/@electron-forge/core/dist/api/make.js:181:43
    at async Task.task (/home/user/Projects/Catalyst/node_modules/@electron-forge/tracer/dist/index.js:58:20)
    at async Task.run (/home/user/Projects/Catalyst/node_modules/listr2/dist/index.cjs:978:11)
    at async /home/user/Projects/Catalyst/node_modules/p-map/index.js:57:22

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

1 participant