nstudio / xplat

Cross-platform (xplat) tools for Nx workspaces.
MIT License
369 stars 52 forks source link

Component generation error ... not resolving correct path Xplat 11.0.3 #234

Closed alpha2k-io closed 3 years ago

alpha2k-io commented 3 years ago

trying to generate a component for an existing feature using latest NX/XPLAT, and the path to the module feature is not resolved correctly. Resolving to.....

libs/xplat/web/features/src/lib/cms-content-management/cms-content-management.module.ts does not exist.

Should be ...

libs/features/cms-content-management/cms-content-management.module.ts

alpha2k-io commented 3 years ago

Temporary workaround ... If i revert back to vs 9.0.4 .. it works. The issue in version 10, the schematics automatically upgrades to the latest. this is great as long as there are no bugs. Suggest a flag to NOT update to latest in case something like this happens.

keep up the good work... AJ

NathanWalker commented 3 years ago

@alpha2k-io On a branch, we'd recommend migrating to v11 as we have written a migration for this which we'll be publishing a blog post containing details this week however you can follow these instructions when you are ready:

nx migrate latest
npm install
nx migrate --run-migrations=migrations.json
nx migrate @nstudio/xplat@latest

npm install

IMPORTANT: Don't forget to run npm install at the end.

Now that the latest versions are installed, kick off the xplat architecture init to add the new xplat lib separations.

You will want to pass just the platforms which you currently use in your workspace. The prefix you use can be the same your workspace is currently configured to use. This can be found in package.json under the xplat key.

nx g @nstudio/xplat:init --prefix=abc --platforms=web,nativescript --framework=angular

With the new architecture in place, you can now kick off the xplat workspace migration:

nx migrate --run-migrations=migrations.json

This will handle a lot of laborious manual update tasks like:

Lastly do a full clean of your workspace to ensure you're in good updated shape now:

npm run clean