Issue is related with change in Prettier 1.10.2. bin/prettier.js has been changed to bin-prettier.js by https://github.com/prettier/prettier/issues/3574#issuecomment-356605745 so command from https://github.com/nrwl/nx/blob/3531323fb5210b995b1296a198c8e76ee8bf9a07/packages/schematics/src/command-line/format.ts#L59 does not work anymore.
Please check issue in Prettier repo: https://github.com/prettier/prettier/issues/3709
This should resolve the issue:
- `node ./node_modules/prettier/bin/prettier.js --single-quote --print-width 120 --write ${patterns.join(' ')}`,
+ `node ./node_modules/.bin/prettier --single-quote --print-width 120 --write ${patterns.join(' ')}`,
As a workaround I have downgrade: npm install [email protected] --save
You can just downgrade to 1.10.1 FYI.
Opened a PR #199
You can write "format": "prettier --write ... because node ./node_modules/.bin/prettier redundant
still error with --dry-run
npm install [email protected] -D
ng generate app myapp --routing --style=scss --dry-run
This issue was fixed in 0.6.18.
Most helpful comment
You can just downgrade to
1.10.1FYI.