nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.29k stars 2.32k forks source link

@nrwl/nest:application schematic doesn't support --strict flag #12407

Closed Gkleinereva closed 1 year ago

Gkleinereva commented 1 year ago

Current Behavior

When I run the most recent @nrwl/nest:application schematic and pass the --strict flag, the command fails with the error below. It appears that it is impossible to generate a nest application in strict mode using the @nrwl schematic, even though the @nest schematic supports it.

Expected Behavior

Generating a new nest application in strict mode should be supported by the schematic and should likely be the default, like it is with Angular applications. Additionally, strict mode should likely be the default for the @nrwl/nest:library schematic (though that one does currently support the flag).

Steps to Reproduce

PR demonstrating issue on https://github.com/nrwl/nx-examples at https://github.com/nrwl/nx-examples/pull/234.

  1. Check out the branch on the PR above and install dependencies
  2. Run the schematic command with nx generate @nrwl/nest:application TestApp --no-interactive --strict
  3. See that it doesn't recognize the --strict flag

Failure Logs

Error: ColonExpected in /home/ekleiner/synap/projects/synap/esk-test/nx.json at position 1255
    at parseJson (/home/ekleiner/synap/projects/synap/esk-test/node_modules/nx/src/utils/json.js:23:15)
    at readJsonFile (/home/ekleiner/synap/projects/synap/esk-test/node_modules/nx/src/utils/fileutils.js:23:37)
    at Workspaces.readNxJson (/home/ekleiner/synap/projects/synap/esk-test/node_modules/nx/src/config/workspaces.js:155:63)
    at readNxJson (/home/ekleiner/synap/projects/synap/esk-test/node_modules/nx/src/config/configuration.js:7:72)
    at Object.<anonymous> (/home/ekleiner/synap/projects/synap/esk-test/node_modules/nx/src/daemon/client/client.js:262:72)
    at Module._compile (/home/ekleiner/synap/projects/synap/esk-test/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)

Environment

NX Report complete - copy this into the issue template

Node : 16.16.0 OS : linux x64 yarn : 1.22.19

nx : 14.6.3 @nrwl/angular : 14.6.3 @nrwl/cypress : 14.6.3 @nrwl/detox : Not Found @nrwl/devkit : 14.6.3 @nrwl/eslint-plugin-nx : 14.6.3 @nrwl/express : Not Found @nrwl/jest : 14.6.3 @nrwl/js : 14.8.3 @nrwl/linter : 14.6.3 @nrwl/nest : 14.8.3 @nrwl/next : Not Found @nrwl/node : 14.8.3 @nrwl/nx-cloud : 14.6.1 @nrwl/nx-plugin : Not Found @nrwl/react : 14.6.3 @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.6.3 @nrwl/web : 14.6.3 @nrwl/workspace : 14.6.3 typescript : 4.7.2

Local workspace plugins:

Community plugins: @ngrx/component-store: 14.0.2 @ngrx/effects: 14.0.2 @ngrx/entity: 14.0.2 @ngrx/router-store: 14.0.2 @ngrx/store: 14.0.2 @ngrx/store-devtools: 14.0.2

(node:2088) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/ekleiner/synap/projects/synap/nx-examples/node_modules/tslib/package.json. Update this package.json to use a subpath pattern like "./*". (Use node --trace-deprecation ... to show where the warning was created)

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

Gkleinereva commented 1 year ago

Bump :)

github-actions[bot] commented 1 year ago

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.