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

ng generate app failed at the nx-sandbox@0.0.0 format script. #50

Closed
dherges opened this issue Oct 11, 2017 · 8 comments
Closed

ng generate app failed at the nx-sandbox@0.0.0 format script. #50

dherges opened this issue Oct 11, 2017 · 8 comments

Comments

@dherges
Copy link
Contributor

dherges commented Oct 11, 2017

# Create nx sandbox
$ curl -fsSL https://raw.githubusercontent.com/nrwl/nx/master/packages/install/install.sh | bash -s nx-sandbox
$ cd nx-sandbox
$ ng generate app an-app
...
  update .angular-cli.json (1361 bytes)
No matching files. Patterns tried: '{apps,libs}/**/*.ts' !**/node_modules/** !./node_modules/**
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nx-sandbox@0.0.0 format: `prettier --single-quote --print-width 120 --write '{apps,libs}/**/*.ts'`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nx-sandbox@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!     ~\npm-cache\_logs\2017-10-11T10_44_53_010Z-debug.log
$ node --version
v8.4.0

$ ng --version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.5.0-beta.2
node: 8.4.0
os: win32 x64
@angular/animations: 4.4.4
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.5.0-beta.2
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.3.4

$ cat node_modules/@nrwl/nx/package.json
{
  "name": "@nrwl/nx",
  "version": "0.0.5+a43fbae",
  "description": "Nrwl Extensions for Angular",
..

$ cat node_modules/@nrwl/schematics/package.json
{
  "name": "@nrwl/schematics",
  "version": "0.0.5+a43fbae",
  "description": "Nrwl Extensions for Angular: Schematics",
..
@dherges
Copy link
Contributor Author

dherges commented Oct 11, 2017

Same for ng g lib a-lib:

$ ng g lib a-lib

  update .angular-cli.json (1485 bytes)
No matching files. Patterns tried: '{apps,libs}/**/*.ts' !**/node_modules/** !./node_modules/**
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nx-sandbox@0.0.0 format: `prettier --single-quote --print-width 120 --write '{apps,libs}/**/*.ts'`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nx-sandbox@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!     ~\npm-cache\_logs\2017-10-11T10_50_00_822Z-debug.log

@dherges
Copy link
Contributor Author

dherges commented Oct 11, 2017

But nevertheless, output is written to apps/an-app and libs/a-lib.

@ghost
Copy link

ghost commented Oct 11, 2017

Having similar issues when using ng generate app|etc in Windows 10 after yarn add @nrwl/schematics. My errors involved 'xargs' not being recognized. As mentioned, the expected files were written.

@vsavkin
Copy link
Member

vsavkin commented Oct 11, 2017

Could you provide a repro?

@dherges
Copy link
Contributor Author

dherges commented Oct 12, 2017

Hi Viktor @vsavkin,

here is the repository: https://github.com/dherges/nx-sandbox

It has been set up with the sandbox script (see above) on a Windows 7 64bit machine.

@vsavkin
Copy link
Member

vsavkin commented Oct 16, 2017

This should be fixed in @nrwl/schematics 0.0.7 (here the commit 0414e04).

If you update @nrwl/schematics and @nrwl/nx to 0.0.7, the issue should be resolved.

@vsavkin vsavkin closed this as completed Oct 31, 2017
@YonatanKra
Copy link

Just posted an issue that a deeper look might be related: #960
My nx schematics are version 7.1.1

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants