Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maxostarr opened this issue Sep 17, 2016 · 3 comments
Open

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

maxostarr opened this issue Sep 17, 2016 · 3 comments

Comments

@maxostarr
Copy link

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
Copy link
Collaborator

Awk34 commented Sep 20, 2016

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

@jeremywhittington
Copy link

jeremywhittington commented Jan 14, 2017

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
[email protected]

> 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
Copy link
Collaborator

Awk34 commented Jan 14, 2017

@jeremywhittington [email protected] does not support subgenerators yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants