Gulp 在节点模块更新后不起作用

Gulp does not work after node-modules update

目前我使用 Gulp 通过从 gulpfile.ts

开始的一系列 TS 导入加载任务

当我将一些依赖项更新到最新版本时 - gulp 停止工作。首先我认为项目本身有问题,但后来我发现 gulp cli 通常是一团糟——它不识别 cli 选项。这很可能是因为我在我的项目中使用了 yargs,它可能与 gulp 有某种冲突 - 但我不知道从哪里开始看。

PS C:\ci> gulp gulp -T
[11:18:21] Tasks for C:\ci\gulpfile.js
...


PS C:\ci> yarn add build-process@2.1.5-alpha.4
yarn add v1.17.3
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
warning No license field
warning "build-process" is already in "devDependencies". Please remove existing entry first before adding it to "dependencies".
success Saved 8 new dependencies.
info Direct dependencies
└─ build-process@2.1.5-alpha.4
info All dependencies
├─ @kwsites/file-exists@1.1.1
├─ @kwsites/promise-deferred@1.1.1
├─ @types/xml2js@0.4.5
├─ build-process@2.1.5-alpha.4
├─ disme-client@2.0.0
├─ fortify-client@2.0.0
├─ simple-git@2.20.1
└─ yargs@15.4.1
Done in 10.24s.
PS C:\ci> gulp gulp -T
error: unknown option '-T'

问题因具体情况而异。我添加的依赖项之一是从 index.js 导入的 commander,它试图在初始加载时解析 gulp 参数。所以错误本身 'error: unknow option -T' 甚至不是来自 gulp.