Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 更新节点模块后Gulp不起作用_Node.js_Npm_Gulp_Yarnpkg - Fatal编程技术网

Node.js 更新节点模块后Gulp不起作用

Node.js 更新节点模块后Gulp不起作用,node.js,npm,gulp,yarnpkg,Node.js,Npm,Gulp,Yarnpkg,目前,我使用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> yar

目前,我使用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导入的,它试图在初始加载时解析gulp参数。因此,错误本身“error:unknow option-T”甚至不是来自gulp。

尝试删除节点模块文件夹,然后npm重新安装它!不幸的是,它不起作用