DaftMonk / generator-ng-component

Component generators for AngularJS
MIT License
31 stars 42 forks source link

TypeError: Cannot read property 'indexOf' of undefined #51

Open maxostarr opened 8 years ago

maxostarr commented 8 years ago

Hey, so when I try and run any of the sub-generators from generator-angular-fullstack I get. TypeError: Cannot read property 'indexOf' of undefined

Here's the full stacktrace.

D:\Desktop\whenDoesItEnd>yo angular-fullstack:route switch
events.js:160
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'indexOf' of undefined
    at Generator.hasExtension (D:\Desktop\whenDoesItEnd\node_modules\generator-ng-component\generators\script-base.js:45:28)
    at Generator.exports.default (D:\Desktop\whenDoesItEnd\node_modules\generator-ng-component\generators\script-base.js:48:25)
    at Generator.initializing (D:\Desktop\whenDoesItEnd\node_modules\generator-ng-component\generators\route\index.js:37:35)
    at Object.<anonymous> (D:\Desktop\whenDoesItEnd\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:431:23)
    at D:\Desktop\whenDoesItEnd\node_modules\run-async\index.js:26:25
    at D:\Desktop\whenDoesItEnd\node_modules\run-async\index.js:25:19
    at D:\Desktop\whenDoesItEnd\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:432:9
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
Awk34 commented 8 years ago

@manmon42 can you post your .yo-rc.json?

jeremywhittington commented 7 years ago

I am getting the same error on Windows 10 64-bit.

>yo angular-fullstack:route foo
events.js:160
      throw er; // Unhandled 'error' event

TypeError: Cannot read property 'indexOf' of undefined
    at Generator.hasExtension (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\script-base.js:45:28)
    at Generator.exports.default (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\script-base.js:48:25)
    at Generator.initializing (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\route\index.js:37:35)
    at Object.<anonymous> (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:431:23)
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\run-async\index.js:25:25
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\run-async\index.js:24:19
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:432:9
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)
> npm -v
4.1.1

> yo --version
1.8.5

> npm list -g generator-angular-fullstack
generator-angular-fullstack@5.0.0-alpha.4

> gulp --v
[03:06:40] Requiring external module babel-register
[03:06:40] CLI version 1.2.2
[03:06:40] Local version 3.9.1
>node --debug "C:\Users\jerem\AppData\Roaming\npm\node_modules\yo\lib\cli.js" angular-fullstack:route foo
Debugger listening on [::]:5858
  yeoman:generator Queueing compose in default +0ms
  yeoman:generator Running compose +16ms
  yeoman:generator Queueing initializing in initializing +0ms
  yeoman:generator Queueing prompting in prompting +1ms
  yeoman:generator Queueing writing in writing +1ms
  yeoman:generator Queueing end in end +1ms
  yeoman:generator Running initializing +2ms
  yeoman:generator An error occured while running initializing TypeError: Cannot read property 'indexOf' of undefined
    at Generator.hasExtension (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\script-base.js:45:28)
    at Generator.exports.default (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\script-base.js:48:25)
    at Generator.initializing (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\route\index.js:37:35)
    at Object.<anonymous> (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:431:23)
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\run-async\index.js:25:25
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\run-async\index.js:24:19
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:432:9
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5) +15ms
events.js:160
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'indexOf' of undefined
    at Generator.hasExtension (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\script-base.js:45:28)
    at Generator.exports.default (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\script-base.js:48:25)
    at Generator.initializing (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\generators\route\index.js:37:35)
    at Object.<anonymous> (C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:431:23)
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\run-async\index.js:25:25
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\run-async\index.js:24:19
    at C:\Users\jerem\AppData\Roaming\npm\node_modules\generator-ng-component\node_modules\yeoman-generator\lib\base.js:432:9
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)

.yo-rc.json.txt

Awk34 commented 7 years ago

@jeremywhittington generator-angular-fullstack@5.0.0-alpha.4 does not support subgenerators yet