Electron-App - Node FS is not useable any longer #13248
Unanswered
tvx17
asked this question in
CLI - Electron mode
Replies: 1 comment
-
If I understand you correctly you're trying to import fs straight to vue files which isn't how it should be done now. You should place your fs function in main and trigger it from preload with ipc. If you could show some code maybe I could help you a bit more. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
A year ago I developed an app using Quasar in combination with Electron fully using all possibilities of the Quasar framework without any libraries. It was a desktop app that loads and writes some json files for configuration issues. That was no problem. It runs without any errors. Now, after a year, I want to build an app as successor of the first app. This app uses the newest version of Quasar with Vue3, TS and electron. But it fails. It fails using "fs" module of NodeJs, the basic module for reading files.
After a long time searching for a resolution, I'm going slightly mad. Nothing of the found solutions was successful. I tried solutions by configuring polyfills via webpack, tried to add something to preload.js, tried to modify electron-main.js by setting contextIsolation to false, nodeIntegration to true. There is always the error "Module not found: Can't resolve imported dependency "fs"" while importing fs in a SFC (import fs from 'fs'). I also tried to setup an electron project without Quasar. Without Quasar, there is no problem using 'fs'.
Has anybody a resolution to solve this problem. Otherwise, Quasar is not any longer useable for me.
Regards
Chris
Beta Was this translation helpful? Give feedback.
All reactions