angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
313 stars 56 forks source link

Feature request: A DDD-aware move command #60

Closed bjornharvold closed 2 years ago

bjornharvold commented 3 years ago

I haven't been successful in using Nx's native move command to, for example,

nx g @nrwl/angular:move --project property-ui-card inventory/inventory-ui-hotel-card

Getting error:

RangeError: path should be a `path.relative()`d string, but got "."
    at throwError (/Users/crash/git/iko-travel-spa/node_modules/ignore/index.js:366:9)
    at checkPath (/Users/crash/git/iko-travel-spa/node_modules/ignore/index.js:385:12)
    at Ignore._test (/Users/crash/git/iko-travel-spa/node_modules/ignore/index.js:502:5)
    at Ignore.ignores (/Users/crash/git/iko-travel-spa/node_modules/ignore/index.js:541:17)
    at Object.visitNotIgnoredFiles (/Users/crash/git/iko-travel-spa/node_modules/@nrwl/devkit/src/generators/visit-not-ignored-files.js:15:71)
    at Object.updateImports (/Users/crash/git/iko-travel-spa/node_modules/@nrwl/workspace/src/generators/move/lib/update-imports.js:41:22)
    at /Users/crash/git/iko-travel-spa/node_modules/@nrwl/workspace/src/generators/move/move.js:23:26
    at Generator.next (<anonymous>)
    at /Users/crash/git/iko-travel-spa/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
path should be a `path.relative()`d string, but got "."

Here I am trying to move a module under the 'property' domain to another domain called 'inventory' and rename the module to fit where it's located.

manfredsteyer commented 2 years ago

I really think this was an issue of Nx back then.