Unable to load preload script. Error: module not found: fs/promises #14179
Labels
area/cli
bug/0-needs-info
Need more info to reproduce
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
Quasar 2.7.7 in Electron mode is currently broken when using fs promises APIs. Same issue as #11759, which seemed closed without a solution?
OS: Windows 11
Node.js: 18.7.0 | 16.15.1 | 14.17.4 (webpack flavor only as vite needs higher) Same error on all 3 versions
Quasar 2.7.7
Electron: installed by quasar
What did you expect to happen?
In Electron console, no errors should be thrown
Reproduction URL
github
How to reproduce?
npm i -g @quasar/cli
npm init quasar
choose either Vite or Webpack
Features pick ESLint, Pinia, Vue-i18n
all others default
quasar mode add electron
Replace content in src-electron/electron-preload.js with:
quasar dev -m electron
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)
Platforms/Browsers
Electron
Quasar info output
No response
Relevant log output
No response
Additional context
There would be no error on console if
import { readFile } from 'fs/promises'
is commented out as well as the readFile exposed APIThe text was updated successfully, but these errors were encountered: