Vue-cli-plugin-electron-builder: fs.existsSync is not a function

Created on 15 Jul 2020  Â·  2Comments  Â·  Source: nklayman/vue-cli-plugin-electron-builder

when I update the plugin from 1.4.6 to 2.0, there was an error when I ran the project:fs.existsSync is not a function.How can I fix it?

Uncaught TypeError: fs.existsSync is not a function
    at getElectronPath (webpack-internal:///./node_modules/electron/index.js:7)
    at eval (webpack-internal:///./node_modules/electron/index.js:18)
    at Object../node_modules/electron/index.js (chunk-vendors.js:4359)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/GlobalBar.vue?vue&type=script&lang=js&:24)
    at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/GlobalBar.vue?vue&type=script&lang=js& (app.js:1030)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (webpack-internal:///./src/components/GlobalBar.vue?vue&type=script&lang=js&:2)

Most helpful comment

All 2 comments

....... how about a normal node js app?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sanch941 picture sanch941  Â·  6Comments

Timibadass picture Timibadass  Â·  6Comments

nickduskey picture nickduskey  Â·  3Comments

iamazik picture iamazik  Â·  5Comments

thislooksfun picture thislooksfun  Â·  6Comments