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

npm run make error: DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake. #3640

Open
3 tasks done
StrongerLph opened this issue Jun 23, 2024 · 3 comments

Comments

@StrongerLph
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.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

@BaraKona
Copy link

Is there a solution to this problem? I am having practically the same issue running electron-vite with forge.

@BaraKona
Copy link

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

@StrongerLph
Copy link
Author

StrongerLph commented Aug 28, 2024

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

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

2 participants