Closed d-rep closed 8 years ago
Weird. Does using yo ng-poly:service a --module=home
work? I'll try to look into this tonight.
Yes - that's a good workaround, thanks Dustin.
$ yo ng-poly:service a --module=home
Module file names without a `-module` prefix are deprecated. Official support will be dropped in v0.12.0. Add a `-module` prefix to be officially supported.
Module file names without a `-module` prefix are deprecated. Official support will be dropped in v0.12.0. Add a `-module` prefix to be officially supported.
create app/home/a-service.js
create app/home/a-service_test.js
I haven't been able to reproduce this on my Mac. Is your project public by any chance? Or even a file structure with changed names?
Not sure why the module choice selector doesn't work, while the module flag does work.
After selecting the module generating a directive, I get the error below.
I alsoget the same error if I type the module manually: yo ng-poly:directive someDirective --module=base/someModule
My project uses typescript.
Ubuntu 14.04 LTS
npm version: 2.14.12
ng-poly version: 1.5.1
Thanks in advance.
TypeError: Cannot read property 'indexOf' of undefined at Object.findModuleFile$ (..../generator-ng-poly/generators/utils/module.js:228:25) at tryCatch .....(/node_modules/generator-ng-poly/node_modules/babel- polyfill/node_modules/babel-regenerator-runtime/runtime.js:61:40) at GeneratorFunctionPrototype.invoke [as _invoke] (...../node_modules/generator-ng-poly/node_modules/babel- polyfill/node_modules/babel-regenerator-runtime/runtime.js:329:22)
I believe this has been fixed, if not please feel free to re-open.
When I'm using ng-poly to create anything (angular service, view, etc) inside an existing ng-poly project, it asks me to choose a module but doesn't display a list of the modules in my project. When I hit the up or down arrow keys, it crashes.
This is generator-ng-poly@0.11.3 and Node v5.0.0 and npm v3.3.9 on a Mac. I've also tried downgrading to ng-poly 0.11.2 and 0.11.1 and got the same behavior.