How does gulp4 invoke the node build/build.js command

before 3.9, you can use gulp-shell, to upgrade to 4.0

.
// vue-cli package.json script 
const gulp = require("gulp")
const exec = require("child_process").exec
gulp.task("webpack", (cb) => {
  return exec(`node build/build.js`, (err, stdout, stderr) => {
    if (err) {
      return err
    }
  })
})
gulp.task("default", gulp.series("webpack"))

as a result, the error was reported

 Error: exited with error code: 1
    at ChildProcess.onexit (C:\project\mulit_env\node_modules\end-of-stream\index.js:39:36)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

or are there any other plug-ins

Mar.22,2021

have you solved it

Menu