Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save NathanWalker/a8554c1e0bba700affeb0c4672d26b0e to your computer and use it in GitHub Desktop.
Nx with SchematicNameCollisionException error patch fix
diff --git a/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js b/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js
index 1d2c59c..9ed0cb1 100755
--- a/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js
+++ b/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js
@@ -137,7 +137,7 @@ class FileSystemEngineHostBase {
const aliases = description.schematics[schematicName].aliases || [];
for (const alias of aliases) {
if (allNames.indexOf(alias) != -1) {
- throw new SchematicNameCollisionException(alias);
+ // throw new SchematicNameCollisionException(alias);
}
}
allNames.push(...aliases);
@NathanWalker
Copy link
Author

This patch file can be downloaded into a patches folder at the root of your workspace.
Then:

  1. npm install patch-package -D
  2. Run npx patch-package to apply the patch.
  3. To ensure the patch is always applied in the future, add to your package.json the following:
"scripts": {
  "postinstall": "npx patch-package"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment