After running npm run build:web and running on an http server withhttp-server the folder dist / web I have the following error in the console and the page is blank

Same here !
After running yarn build:web I got this error first :

I changed .electron-vue/webpack.web.config.js in my local repository after refer to https://github.com/webpack-contrib/css-loader/issues/447 :
let webConfig = {
devtool: '#cheap-module-eval-source-map',
entry: {
web: path.join(__dirname, '../src/renderer/main.js')
},
+ node: {
+ fs: 'empty'
+ },
module: {
rules: [...]
}
...
}
After that yarn build:web built successfully, but I got this error in Chrome :
o.existsSync is not a function. ('o' should be 'fs' ?)

|OS :|Windows 10 or Ubuntu 18.04|
|:-|:-|
|Node : |v8.11.2 |
|NPM : |5.6.0|
|Others : |package.json|
Can anyone help me ? Many thanks !
I fixed it by catching the exception of require('electron').shell.openExternal(url).
The changes in my codes as follows:
src/renderer/main.js:

src/renderer/components/GithubCorner/index.vue:

Hm, on the latest version of this template I'm not running into the same error, but after looking at @CS-Tao 's suggestion we might still want to add that to the template.
I tested on Windows 10 though, and with newer versions of the template and NPM (6.4.1). If someone could confirm this is still an issue or if the fix above should be added to the template, that would be appreciated!
I have the same error:
adding in webpack.web.config.js:
node: {
fs: 'empty'
},
I recieve this error visiting index.html
Uncaught TypeError: n.existsSync is not a function
at Object.(web.js:14)
at Object.(web.js:14)
at c (web.js:1)
at r (web.js:1)
at Object.(web.js:14)
at c (web.js:1)
at r (web.js:1)
at Object.(web.js:14)
at c (web.js:1)
at r (web.js:1)
electron-vue: latest
s.o: windows 10 x64
node: 10.13.0
npm: 6.4.1
I also have the same problem ..
The #857 says #751 has solved this problem.
after the exclusion of [electron-vuex] in the build: web environment, $ yarn run build: web can be packaged normally, and the index.html file can run normally without error.
Most helpful comment
I have the same error:
adding in webpack.web.config.js:
node: { fs: 'empty' },I recieve this error visiting index.html
electron-vue: latest
s.o: windows 10 x64
node: 10.13.0
npm: 6.4.1