webpack-electron, [11440:0125/075150.232:ERROR:CONSOLE(1)] "Request Network.loadNetworkResource failed

442 Views Asked by At

I try to run electron using webpack, when I run electron with the watcher running then elecrone spits out the following in the console

"[11440:0125/075150.232:ERROR:CONSOLE(1)] 
"Request Network.loadNetworkResource failed. 
 { 
   "code":-32602,
   "message" : "Unsupported URL scheme"
 }","

Does anyone recognize the error? Searched the internet with nothing relevant.

webpack.config.js

const path = require('path');

const nodeExternals = require('webpack-node-externals');

module.exports = {
    mode: 'development',
    target: 'node',
    // externalsPresets: { node: true },
    entry: './client/app.coffee',

    // externals: [nodeExternals(
    //     {
    //         allowlist:['@babel/polyfill', 'jquery-contextmenu', 'jquery', 'handsontable']
    //     }

    // )],


    output: {
        path: path.resolve(__dirname, 'electron/app'),
        filename: 'bundle.js',
    },
    module: {
        rules: [
            { test: /\.coffee$/, loader: 'coffee-loader' },
            {
                test: /\.hbs$/,
                loader: 'handlebars-loader',
                options: { ignorePartials: true, ignoreHelpers: true }
            },
        ]
    },
    resolve: {
        aliasFields: ['browser'],
        mainFields: ['browser', 'main', 'module'],
    },
    watch: true,
};

I expect to get no error printed to the console

1

There are 1 best solutions below

0
Denis Howe On

This error appears (541 times!) when our main process calls win.webContents.openDevTools().