npm run make error: DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
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.
Electron Forge version
7.4.0
Electron version
31.0.2
Operating system
windows11
Last known working Electron Forge version
No response
Expected behavior
npm run make success without any error
Actual behavior
$ npm run make
[email protected] 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 ✔ [plugin-vite] Building vite bundles ✔ Packaging application ✔ Packaging for x64 on win32 [3s] ✔ Running postPackage hook ✔ Running preMake hook ✔ Making distributables ✔ Making a squirrel distributable for win32/x64 [31s] ✔ Running postMake hook › Artifacts available at: E:\my_projects\electron-vue3-ts-vite-forge\out\make
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
vite v5.3.1 building for production...
vite v5.3.1 building for production...
vite v5.3.1 building for production...
transforming (1) index.html
transforming (1) src\preload.ts
✓ 1 modules transformed.
Generated an empty chunk: "preload".
rendering chunks (1)...
transforming (1) src\main.ts
✓ 1 modules transformed.
rendering chunks (1)...
computing gzip size (0)...
computing gzip size (0)...
computing gzip size (1)...
.vite/build/preload.js 0.01 kB │ gzip: 0.03 kB
✓ built in 62ms
✓ 4 modules transformed.
computing gzip size (1)...
.vite/build/main.js 0.50 kB │ gzip: 0.32 kB
✓ built in 70ms
rendering chunks (1)...
computing gzip size (0)...
computing gzip size (1)...
computing gzip size (2)...
computing gzip size (3)...
.vite/renderer/main_window/index.html 0.37 kB │ gzip: 0.26 kB
.vite/renderer/main_window/assets/index-CKttBNm8.css 0.14 kB │ gzip: 0.14 kB
.vite/renderer/main_window/assets/index-D8Tcqwow.js 0.79 kB │ gzip: 0.46 kB
✓ built in 77ms
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(Use node --trace-deprecation ... to show where the warning was created)
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:5804) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
Steps to reproduce
1、npm init electron-app@latest my-app -- --template=vite-typescript 2、npm start 3、npm run make
Additional information
node version: v22.3.0
Is there a solution to this problem? I am having practically the same issue running electron-vite with forge.
Is there a solution to this problem? I am having practically the same issue running electron-vite with forge.
For those having a similar issue and using node > 21. You can disable node warnings which will allow for the make to run.
This is not a fix and I don't know what side-effects this might have.
export NODE_OPTIONS=--disable-warning=DEP0174
Is there a solution to this problem? I am having practically the same issue running electron-vite with forge.
I tried a few suggestions on the Internet, but nothing worked, and I ended up using electron-builder instead
FWIW this is a warning that shouldn't stop your build.
FWIW this is a warning that shouldn't stop your build.
Yes, it is a warning. And indeed, it does not stop the build. Nevertheless, it is an indication that some code, somewhere smells! So, a solution would be highly appreciated.
thank you verry much i use this command before i pachage my app and ts work good :
export NODE_OPTIONS=--disable-warning=DEP0174
thank you verry much bro
Closing as a duplicate of https://github.com/electron/forge/issues/3828