Skip to content

Did you forget to signal async completion... #245

@DenisLopatin

Description

@DenisLopatin
{
  ...
  "devDependencies": {
    "@babel/preset-env": "^7.16.11",
    "@babel/register": "^7.17.7",
    "babel-loader": "^8.2.3",
    "gulp": "^4.0.2",
    "gulp-autoprefixer": "^8.0.0",
    "gulp-concat": "^2.6.1",
    "gulp-cssmin": "^0.2.0",
    "gulp-rename": "^2.0.0",
    "gulp-sourcemaps": "^3.0.0",
    "gulp-typescript": "^6.0.0-alpha.1",
    "prettier": "^2.5.1",
    "ts-loader": "^9.2.8",
    "tslint": "^6.1.3",
    "typescript": "^4.6.2",
    "webpack-stream": "^7.0.0"
  }
}
import {src, dest,} from 'gulp';
import webpack from 'webpack-stream';
import rename from 'gulp-rename';

function scripts() {
    return src("javascript/main.js")
        .pipe(
            webpack({
                output: {
                    filename: "bundle.js",
                },
                devtool: "inline-source-map",
                module: {
                    rules: [
                        {
                            test: /\.m?js$/,
                            exclude: /(node_modules|bower_components|vendor)/,
                            use: {
                                loader: "babel-loader",
                                options: {
                                    presets: ["@babel/preset-env"],
                                },
                            },
                        },
                        {
                            test: /\.tsx?$/,
                            use: "ts-loader",
                            exclude: /node_modules/,
                        },
                    ],
                },
                resolve: {
                    extensions: [".ts", ".js"],
                },
                mode: "development",
            })
        )
        .on("error", (err) => console.error(err))
        .pipe(dest("public/scripts"));
}

export {scripts};

Everything worked yesterday, today I get the following error:

Did you forget to signal async completion

What I did:

  1. These tips didn't help: first, second
  2. I tried using async before scripts function and I did it with @babel/polyfill, but it didn't help me. Fallowing example don't work:
async function scripts() {
   ...

async function scripts() {
   await src("javascript/main.js")
   ...

function scripts(done) {
    src("javascript/main.js")
   ...
   done();

etc...

It worked yesterday!!! But don't work today. I special download my first commit (I did this when everything was working well) and
it doesn't work too!!!

One day has passed, and everything has already broken...

File structure:

-javascript (entree)
-public/scripts/ (output)

Thanks!

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