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

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

Closed
3 tasks done
caoxuccc opened this issue Feb 23, 2024 · 3 comments

Comments

@caoxuccc
Copy link

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.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/[email protected]/node_modules/flora-colossus/lib/Walker.js:57:19)
at async Walker.walkDependenciesForModule (/Users/.../node_modules/.pnpm/[email protected]/node_modules/flora-colossus/lib/Walker.js:113:13)
at async Walker.walkDependenciesForModuleInModule (/Users/.../node_modules/.pnpm/[email protected]/node_modules/flora-colossus/lib/Walker.js:63:13)
at async Walker.walkDependenciesForModule (/Users/.../node_modules/.pnpm/[email protected]/node_modules/flora-colossus/lib/Walker.js:113:13)
at async /Users/.../node_modules/.pnpm/[email protected]/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
Copy link

TechQuery commented Apr 18, 2024

This comment resolves my similar bug: #2633 (comment)

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

@ycjcl868
Copy link

ycjcl868 commented Jan 9, 2025

same issue

@shansec
Copy link

shansec commented Feb 10, 2025

Using the npm package management tool is normal, but this problem will occur when using pnpm.

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

5 participants