Skip to content

@ngrx/schematics has a template error when creating containers #778

@matthewharwood

Description

@matthewharwood

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

Running npx ng generate container user/containers/Master --collection=@ngrx/schematics
will create a syntax error in the component created it adds an extra bracket after the constructor.
Also it is missing the Store import

Expected behavior:

That the extra closing braces isnt' created.
Isn't missing Store import

Minimal reproduction of the problem with instructions:

npx ng g module User --flat false
npx ng g feature user/User -m user.module.ts --group --collection=@ngrx/schematics
npx ng g container user/containers/Master --collection=@ngrx/schematics

Version of affected browser(s),operating system(s), npm, node and ngrx:

os: windows 10 64bit - node: 8.9.3 - npm: 5.5.1

Other information:

Error: Command failed: node C:\Users\matth\workspace\platform-v4\morningharwood\node_modules\prettier\bin-prettier.js --single-quote --print-width 120 --write "{apps,libs}/**/*.ts"
    at checkExecSyncError (child_process.js:601:13)
    at Object.execSync (child_process.js:641:13)
    at write (C:\Users\matth\workspace\platform-v4\morningharwood\node_modules\@nrwl\schematics\src\command-line\format.js:59:25)
    at Object.format (C:\Users\matth\workspace\platform-v4\morningharwood\node_modules\@nrwl\schematics\src\command-line\format.js:32:13)
    at Object.<anonymous> (C:\Users\matth\workspace\platform-v4\morningharwood\node_modules\@nrwl\schematics\src\command-line\nx.js:14:18)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! morningharwood@0.0.0 format: `nx format write`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the morningharwood@0.0.0 format script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\matth\AppData\Roaming\npm-cache\_logs\2018-02-03T04_30_44_732Z-debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions