electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.33k stars 494 forks source link

Error: Failed to locate module "debug" from "/Users/.../electron-forge-template/node_modules/electron-squirrel-startup" #3504

Open caoxuccc opened 4 months ago

caoxuccc commented 4 months ago

Pre-flight checklist

Electron Forge version

7.3.0

Electron version

v29.0.1

Operating system

macOs 14.3.1

Last known working Electron Forge version

No response

Expected behavior

Running 'pnpm make' can be successful.

Actual behavior

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 darwin ✖ Copying files › Failed to locate module "debug" from "/Users/.../node_modules/electron-squirrel-startu… This normally means that either you have deleted this package already somehow (check your ignore settings if using electron-packager). Or your… ◼ Preparing native dependencies ◼ Finalizing package ◼ Running postPackage hook ◼ Running preMake hook ◼ Making distributables ◼ Running postMake hook

An unhandled rejection has occurred inside Forge: Error: Failed to locate module "debug" from "/Users/.../node_modules/electron-squirrel-startup"

    This normally means that either you have deleted this package already somehow (check your ignore settings if using electron-packager).  Or your module installation failed.

at Walker.walkDependenciesForModuleInModule (/Users/.../node_modules/.pnpm/flora-colossus@2.0.0/node_modules/flora-colossus/lib/Walker.js:57:19) at async Walker.walkDependenciesForModule (/Users/.../node_modules/.pnpm/flora-colossus@2.0.0/node_modules/flora-colossus/lib/Walker.js:113:13) at async Walker.walkDependenciesForModuleInModule (/Users/.../node_modules/.pnpm/flora-colossus@2.0.0/node_modules/flora-colossus/lib/Walker.js:63:13) at async Walker.walkDependenciesForModule (/Users/.../node_modules/.pnpm/flora-colossus@2.0.0/node_modules/flora-colossus/lib/Walker.js:113:13) at async /Users/.../node_modules/.pnpm/flora-colossus@2.0.0/node_modules/flora-colossus/lib/Walker.js:133:21  ELIFECYCLE  Command failed with exit code 1.

Steps to reproduce

pnpm create electron-app@latest my-app

pnpm install

pnpm make

Additional information

No response

TechQuery commented 2 months ago

This comment resolves my similar bug: https://github.com/electron/forge/issues/2633#issuecomment-1174790013

then I build an Electron scaffold with PNPM 9: idea2app/Electron-Parcel-PNPM.tsx#1