Error: Task requires a name at Gulp.Orchestrator.add
Error: Task requires a name at Gulp.Orchestrator.add
我正在构建一个 Node Web 应用程序并在 Windows 10 上进行本地测试。自从我上次成功 运行 以来的某个时候,似乎已经安装了此节点模块 orchestrator
,大概是一些依赖。现在我收到这个错误。是什么原因造成的,我该如何解决?
C:\Users\George\Source\Repos\MakeSensePortal>gulp
[23:02:53] Requiring external module babel-register
C:\Users\George\Source\Repos\MakeSensePortal\node_modules\orchestrator\index.js:37
throw new Error('Task requires a name');
^
Error: Task requires a name
at Gulp.Orchestrator.add (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\orchestrator\index.js:37:10)
at Object.<anonymous> (build_html.js:7:6)
at Module._compile (module.js:413:34)
at loader (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\babel-register\lib\node.js:126:5)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\babel-register\lib\node.js:136:7)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at requireDir (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\require-dir\index.js:116:33)
或者,我删除它有关系吗? - 是的,然后我得到一个错误,说找不到 Orchestrator,它似乎在我的 babel-register 中被引用...
更新:
我不确定它是否已链接,但每当我尝试 运行 npm update 等时。我遇到关于 reflect-metadata 的对等依赖问题,但如果我尝试安装它 - 见下文:
C:\Users\George\Source\Repos\MakeSensePortal>npm i reflect-metadata
MakeSensePortal@0.0.1 C:\Users\George\Source\Repos\MakeSensePortal
+-- passport@0.3.2
`-- UNMET PEER DEPENDENCY reflect-metadata@0.1.3
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN angular2@2.0.0-beta.9 requires a peer of reflect-metadata@0.1.2 but none was installed.
我的任务名称后面缺少一个逗号(与 wassname 相同):
gulp.task('name' ['...']);
正确版本:
gulp.task('name', ['...']);
我正在构建一个 Node Web 应用程序并在 Windows 10 上进行本地测试。自从我上次成功 运行 以来的某个时候,似乎已经安装了此节点模块 orchestrator
,大概是一些依赖。现在我收到这个错误。是什么原因造成的,我该如何解决?
C:\Users\George\Source\Repos\MakeSensePortal>gulp
[23:02:53] Requiring external module babel-register
C:\Users\George\Source\Repos\MakeSensePortal\node_modules\orchestrator\index.js:37
throw new Error('Task requires a name');
^
Error: Task requires a name
at Gulp.Orchestrator.add (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\orchestrator\index.js:37:10)
at Object.<anonymous> (build_html.js:7:6)
at Module._compile (module.js:413:34)
at loader (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\babel-register\lib\node.js:126:5)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\babel-register\lib\node.js:136:7)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at requireDir (C:\Users\George\Source\Repos\MakeSensePortal\node_modules\require-dir\index.js:116:33)
或者,我删除它有关系吗? - 是的,然后我得到一个错误,说找不到 Orchestrator,它似乎在我的 babel-register 中被引用...
更新:
我不确定它是否已链接,但每当我尝试 运行 npm update 等时。我遇到关于 reflect-metadata 的对等依赖问题,但如果我尝试安装它 - 见下文:
C:\Users\George\Source\Repos\MakeSensePortal>npm i reflect-metadata
MakeSensePortal@0.0.1 C:\Users\George\Source\Repos\MakeSensePortal
+-- passport@0.3.2
`-- UNMET PEER DEPENDENCY reflect-metadata@0.1.3
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN angular2@2.0.0-beta.9 requires a peer of reflect-metadata@0.1.2 but none was installed.
我的任务名称后面缺少一个逗号(与 wassname 相同):
gulp.task('name' ['...']);
正确版本:
gulp.task('name', ['...']);