3

I am building a Node Web App and testing it locally on Windows 10. At some point since my last successful run, this node module orchestrator seems to have been installed, presumably as some dependency. Now I am getting this error. What is causing this and how do I fix it?

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)

Alternatively, does it matter if I remove it? - Yes, I then get an error saying that Orchestrator cannot be found, and it seems to be referenced in my babel-register...

Update:

I am not sure if it is linked, but whenever I try to run npm update etc. I get peer dependency issues about reflect-metadata, yet if I try to instal it - see below:

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.
George Edwards
  • 8,979
  • 20
  • 78
  • 161
  • The problem might be with your gulp file mind posting it? Try looking in build_html.js line 7, character 6 too. – wassname Apr 19 '16 at 07:12
  • 3
    I had a similar error due to a typo in my gulpfile. Instead of `gulp.task('name',['dep'],function(){})` I had `gulp.task('name' ['dep'],function(){})`. Whats the difference? A comma is missing after name. – wassname Apr 19 '16 at 07:24

1 Answers1

8

A comma was missing just after the task name in my case (same case as wassname) :

gulp.task('name' ['...']);

Correct version :

gulp.task('name', ['...']);
user1075613
  • 725
  • 9
  • 13
  • Thanks, I made some changes, left for lunch came back, and got this error. So frustrating, I spent about 30 minutes trying to figure out what was wrong. – 9ers Rule Oct 03 '16 at 20:49