Skip to content

DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead #221

@AdeptSEO

Description

@AdeptSEO

mode: 'production' gives an error message

(node:5196) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.

// gulpfile.js
function compileScripts() {
    return src('./app/js/main.js')
        .pipe(plumber({
            errorHandler: function(err) {
                console.log(chalk.red(err.message));
                this.emit('end');
            }
        }))
        .pipe(webpackStream(webpackConfig), webpack)
        .pipe(plumber.stop())
        .pipe(dest(filePaths.compileScripts.dest))
        .on('end', browserSync.reload);
}

// webpack.config.js
const path = require('path');
const isDevelopment = !process.env.NODE_ENV || process.env.NODE_ENV === 'development';

module.exports = {
    entry: {
        main: './app/js/main.js',
    },
    output: {
        path: path.resolve(__dirname, 'build', 'js'),
        filename: isDevelopment ? '[name].js' : '[name].min.js',
    },
    mode: isDevelopment ? 'development' : 'production',
    devtool: isDevelopment ? 'inline-cheap-module-source-map' : 'none',
    stats: isDevelopment ? 'errors-only' : 'normal',
    resolve: {
        alias: {
            ready: path.resolve(__dirname, 'app', 'js'),
            blocks: path.resolve(__dirname, 'app', 'views', 'blocks'),
            $: 'jquery',
            jQuery: 'jquery',
            jquery: 'jquery',
        },
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /(node_modules|bower_components)/,
                use: {
                    loader: 'babel-loader',
                },
            },
        ],
    },
    plugins: [],
};

npm 6.13.7
node v13.11.0
gulp CLI version: 2.2.0
gulp Local version: 4.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions