From 05b2fbafa8605c8090659a914bf17ea68b9fb0d1 Mon Sep 17 00:00:00 2001 From: Tasos Bekos Date: Tue, 22 Sep 2020 18:00:38 +0300 Subject: [PATCH] fix(core): declare `cli` as direct dependency Having `cli` as dependency of `workspace` was working because of the flattened module structure that NPM/Yarn use. On stricter package managers like PNPM and Yarn 2 this is not the case, and any `pnpm nx` or `yarn nx` command was failing because `@nrwl/cli` couldn't be located. ISSUES CLOSED: #2944 --- packages/workspace/package.json | 1 - .../src/schematics/workspace/files/package.json__tmpl__ | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workspace/package.json b/packages/workspace/package.json index 9f672a7d19a5f..7d9734022fedb 100644 --- a/packages/workspace/package.json +++ b/packages/workspace/package.json @@ -68,7 +68,6 @@ "yargs": "15.4.1", "yargs-parser": "20.0.0", "chalk": "2.4.2", - "@nrwl/cli": "*", "axios": "0.19.2", "flat": "^5.0.2", "minimatch": "3.0.4", diff --git a/packages/workspace/src/schematics/workspace/files/package.json__tmpl__ b/packages/workspace/src/schematics/workspace/files/package.json__tmpl__ index 7304ad9d5bd3b..21b3e2253ea41 100644 --- a/packages/workspace/src/schematics/workspace/files/package.json__tmpl__ +++ b/packages/workspace/src/schematics/workspace/files/package.json__tmpl__ @@ -41,6 +41,7 @@ "dependencies": {}, "devDependencies": { <% if(cli === 'angular') { %>"@angular/cli": "<%= angularCliVersion %>",<% } %> + "@nrwl/cli": "<%= nxVersion %>", "@nrwl/workspace": "<%= nxVersion %>", "@types/node": "~8.9.4", "dotenv": "6.2.0",