forge icon indicating copy to clipboard operation
forge copied to clipboard

webpack-typescript template results in Error: write EPIPE

Open lorenzrabs opened this issue 10 months ago • 6 comments

Pre-flight checklist

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project uses.
  • [x] 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

34.2.0

Operating system

macOS Sequoia 15.3.1

Last known working Forge version

No response

Expected behavior

I tried to use the webpack-typescript template.

Actual behavior

electron-forge start

✔ Checking your system ✔ Locating application ✔ Loading configuration ✔ Preparing native dependencies [0.1s] ✔ Running generateAssets hook ❯ Running preStart hook ❯ [plugin-webpack] Preparing webpack bundles ✔ Compiling main process code [0.3s] ⠴ Launching dev servers for renderer process code (base) lorenz@MacBook-Air my-app % Error: write EPIPE at target._send (node:internal/child_process:872:20) at target.send (node:internal/child_process:745:19) at /Users/lorenz/Development/my-app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:27:31 at new Promise () at sendMessage (/Users/lorenz/Development/my-app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:19:38) at /Users/lorenz/Development/my-app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:60:27 at Generator.next () at fulfilled (/Users/lorenz/Development/my-app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/expose-rpc.js:5:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -32, code: 'EPIPE', syscall: 'write' }

Steps to reproduce

npx create-electron-app@latest my-app --template=webpack-typescript

cd my-app

npm start

Additional information

node v18.20.2 (npm v10.5.0)

lorenzrabs avatar Feb 25 '25 12:02 lorenzrabs

I cannot reproduce this issue with the steps given.

Try:

  1. Rebooting your computer
  2. Upgrading Node to v22

nikwen avatar Feb 25 '25 14:02 nikwen

@nikwen I'm having the same issue.

im convert a lot of nextJS code to non-NextJS react v18.3.1 code. I'm using TS, webpack, tailwind, zustand, xlsx and shadcn.

heres the project structure:

└─ .eslintrc.json
└─ .gitignore
└─ components.json
└─ forge.config.ts
└─ map-project.js
└─ package-lock.json
└─ package.json
└─ postcss.config.js
└─ src
   ├─ app.tsx
   ├─ components
   │  ├─ Header.tsx
   │  ├─ IconCycling.tsx
   │  ├─ SheetModal.tsx
   │  ├─ ThreeStripesAnimation.tsx
   │  ├─ excel-display.tsx
   │  ├─ step-components.tsx
   ├─ hooks
   │  ├─ use-mobile.ts
   ├─ index.css
   ├─ index.html
   ├─ index.ts
   ├─ lib
   │  ├─ constants.ts
   │  ├─ store.ts
   │  ├─ types.ts
   │  ├─ utils
   │  │  ├─ excel.ts
   │  │  ├─ updateFieldInArray.ts
   │  ├─ utils.ts
   ├─ main.tsx
   ├─ pages
   │  ├─ MainDataPage.tsx
   │  ├─ home.tsx
   ├─ preload.ts
   ├─ renderer.ts
└─ tailwind.config.ts
└─ tsconfig.json
└─ webpack.main.config.ts
└─ webpack.plugins.ts
└─ webpack.renderer.config.ts
└─ webpack.rules.ts

Atlessc avatar Mar 03 '25 18:03 Atlessc

Has someone found the fix for this?

AbhishekMandilkar avatar Apr 08 '25 15:04 AbhishekMandilkar

Has someone found the fix for this?

Yes, I ended up using some template that I found to fulfill all my needs for my current project . Reply to this if you want me to post a link.

Atlessc avatar Apr 08 '25 15:04 Atlessc

I got this error when migrating a vanilla JS Electron app to React. I fixed it by creating a fresh electron app with https://github.com/electron-react-boilerplate/electron-react-boilerplate and adding my code into that new setup. Hope this helps.

KNWR avatar Apr 12 '25 09:04 KNWR

I am not sure, but I've had the same error, and found out that it could be occured when the port for dev server already in use. You can get more information with DEBUG=electron-forge:* npm run start command. I hope this comment would be able to help you.

yeonuk-hwang avatar Apr 21 '25 06:04 yeonuk-hwang