Skip to content

Packaging is taking 15+ minutes on windows because of fast-glob bin deletion. #3877

Closed
@JellyO1

Description

@JellyO1

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.

Forge version

7.7.0

Electron version

26.6.10

Operating system

Windows 11 (10.0.22631)

Last known working Forge version

No response

Expected behavior

electron-forge package only looks for bins to delete in the path.join(buildPath, '**/.bin/**/*').

Actual behavior

electron-forge package seems to be looking into the cwd instead of the passed path to look for the bins to delete.

const bins = await glob(path.join(buildPath, '**/.bin/**/*'));

Although the buildPath seems to be correct fast-glob seems to be starting at cwd.

Steps to reproduce

  1. Create a new Forge app with e.g. npx create-electron-app@latest test-app --template=vite-typescript
  2. Optionally add a bunch of dependencies since this is more pronounced the more dependencies you have.
  3. Run npm run package

Additional information

These are the dependencies with which I've been testing.

"dependencies": {
		"@dnd-kit/core": "^6.0.8",
		"@dnd-kit/modifiers": "^6.0.1",
		"@dnd-kit/sortable": "^10.0.0",
		"@emotion/react": "^11.11.3",
		"@emotion/styled": "^11.11.0",
		"@grpc/grpc-js": "^1.9.3",
		"@jellyno/react-arborist": "^3.4.0",
		"@mui/icons-material": "^5.15.7",
		"@radix-ui/react-checkbox": "^1.1.1",
		"@radix-ui/react-context-menu": "^2.2.4",
		"@radix-ui/react-dialog": "^1.1.4",
		"@radix-ui/react-dropdown-menu": "^2.1.4",
		"@radix-ui/react-icons": "^1.3.0",
		"@radix-ui/react-label": "^2.1.2",
		"@radix-ui/react-popover": "^1.1.5",
		"@radix-ui/react-radio-group": "^1.2.3",
		"@radix-ui/react-select": "^2.1.1",
		"@radix-ui/react-separator": "^1.1.1",
		"@radix-ui/react-slider": "^1.2.2",
		"@radix-ui/react-slot": "^1.1.0",
		"@radix-ui/react-tooltip": "^1.1.6",
		"@radix-ui/react-visually-hidden": "^1.1.2",
		"@redux-devtools/remote": "^0.9.3",
		"@reduxjs/toolkit": "^2.2.1",
		"@tanstack/react-table": "^8.20.6",
		"@tanstack/react-virtual": "^3.11.2",
		"class-variance-authority": "^0.7.0",
		"clsx": "^2.1.0",
		"cmdk": "^1.0.4",
		"dagre": "^0.8.5",
		"date-fns": "^4.1.0",
		"electron-redux": "^2.0.0",
		"electron-router-dom": "^2.1.0",
		"electron-squirrel-startup": "^1.0.0",
		"electron-store": "^8.1.0",
		"i18next": "^23.6.0",
		"i18next-electron-fs-backend": "github:JellyO1/i18next-electron-fs-backend#a6521b5",
		"i18next-fs-backend": "2.3.0",
		"immer": "^10.0.3",
		"jest-environment-jsdom": "^29.7.0",
		"lodash.isequal": "^4.5.0",
		"mime": "^4.0.6",
		"react": "^18.2.0",
		"react-colorful": "^5.6.1",
		"react-day-picker": "^9.5.1",
		"react-dom": "^18.2.0",
		"react-focus-lock": "^2.13.5",
		"react-i18next": "^14.0.0",
		"react-redux": "^9.1.0",
		"react-rnd": "^10.4.14",
		"react-router-dom": "^7.1.5",
		"react-spinners": "^0.13.8",
		"reactflow": "^11.9.1",
		"sonner": "^1.3.1",
		"tailwind-merge": "^2.5.2",
		"tailwindcss": "^3.3.3",
		"tailwindcss-animate": "^1.0.7",
		"ts-results": "^3.3.0",
		"use-resize-observer": "^9.1.0",
		"winston": "^3.11.0"
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions