xplat
xplat copied to clipboard
HELP PLEEEEEASE! Bug in in latest version 20.0.3.
I followed the docs instruction, but can get it together running.
It kept failing during installation, as shown below. Using v19 is not working too.
Even though this is a fresh new project!
@SemAiSoft I have the same issue... if its any help, the last version that I can get to work is with the following commands
npx [email protected] workspace
cd workspace
npm install @nx/[email protected] -D
npx [email protected] g @nx/js:init
npm install @nstudio/[email protected] -D
npx [email protected] g @nstudio/xplat:init
npx [email protected] g @nstudio/xplat:app
I am trying to figure out how to get a more recent release to work... will let you know if I figure it out.
@SemAiSoft I got nx19 to work by doing this..
npx [email protected] workspace
cd workspace
npm install @nx/[email protected] -D
npx [email protected] g @nx/js:init
npm i @angular-devkit/schematics -D
npm install @nstudio/[email protected] -D
npx [email protected] g @nstudio/xplat:init
npx [email protected] g @nstudio/xplat:app
note: after you create your workspace add a .npmrc file to the root of your workspace to deal with legacy stuff.. Put this in the file... legacy-peer-deps=true
For the moment I still have not figured out how to get v20 working.
npx [email protected] g @nstudio/xplat:app
Thanks so much for the guide.
But I am usually stuck at cypress init error, during others generation as shown below.
Have tried nx reset. Any other ways to resolve this?
@SemAiSoft in order for my solution to work you must start fresh, the commands I gave you will not work in an existing repo... that is you MUST start fresh
@SemAiSoft in order for my solution to work you must start fresh, the commands I gave you will not work in an existing repo... that is you MUST start fresh
Yes, thank you.
The point I also have to install all the nx plugins by 'nx add' command, that allows to be properly initiated and configured. Where I am now, nx dev schematics not finding the sample web app name, suppose I want to use it for generating app or angular. Seams, like version mismatch, though I have tried same versions to no avail.
@SemAiSoft I use this command to first get xplat installed correctly for both web and nativescript npx [email protected] g @nstudio/xplat:init
That installs cypress and other packages... then I can go on and create apps with this command npx [email protected] g @nstudio/xplat:app
Currently I am not having a problem with that.
I am also running LTS for node... perhaps that is the difference.
I also run on a Mac... maybe there is a difference on Windows?
@SemAiSoft I use this command to first get xplat installed correctly for both web and nativescript npx [email protected] g @nstudio/xplat:init
That installs cypress and other packages... then I can go on and create apps with this command npx [email protected] g @nstudio/xplat:app
Currently I am not having a problem with that.
I am also running LTS for node... perhaps that is the difference.
I also run on a Mac... maybe there is a difference on Windows?
Thanks so much bro. Pretty the same config, except that I am on Ubuntu Linux.
It just that I like their architectural organizations, else I would have gave up. Meanwhile, I will try my luck with a few more options, and feed you back.
BIG THANKS for the support
@SemAiSoft for the moment xplat will not work on Angular 19.. 18 is fine.
I am working on a work-around... I have been using xplat for years... I do like how its organized... perhaps @NathanWalker can weigh in on the correct way to make it work?
I just finished marking all of the xplat modules to standalone:true... but there are also a few more things with scss
@SemAiSoft for the moment xplat will not work on Angular 19.. 18 is fine.
I am working on a work-around... I have been using xplat for years... I do like how its organized... perhaps @NathanWalker can weigh in on the correct way to make it work?
I just finished marking all of the xplat modules to standalone:true... but there are also a few more things with scss
Well well well, after millions of installs, reinstall, rm node_modules, rm .nx, etc... I finally settle for version 19.0.0 AND only web (nativescript, angular) apps creations. Nest and Electron are not working.
I hope this will be fixed soon as this is GREAT LAYER. Thanks to All.
Angular 19 isn't supported by nx yet. Once it is, nx will automatically migrate all components to standalone: false, I imagine.
@edusperoni Thanks! I totally forgot to check if NX had caught up to Angular v19... yes, I agree.. it most likely "just work" once NX merges the Angular/v19 branch.. looks like they are close.
@SemAiSoft @edusperoni Looks like NX will be releasing soon!
https://github.com/nrwl/nx/pull/28847
So I figure we just need to then get a new XPLAT and things will be back to normal for us that want the latest and greatest?
@edusperoni NX now supports angular 19, would you be able to update xplat? https://nx.dev/nx-api/angular/documents/angular-nx-version-matrix @SemAiSoft once thats done then you should be able to create a new workspace with nx, install xplat and all should be good.
@edusperoni @NathanWalker is there any ETA when xplat will be able to install on the latest version a fresh workspace? Currently it's not working and fails where you init with this error. I have tried it with and without installing eslint and fails both for web and nativescript setup... I also ensured that the xplat directory does not exist (as indicated in the error)
Any ideas?
`npx nx@latest g @nstudio/xplat:init
NX Generating @nstudio/xplat:init
✔ Would you like to generate xplat supporting architecture now? You can also generate later with: nx generate @nstudio/xplat:init · web ✔ Do you prefer to use a frontend framework? · angular ✔ Please input a 2-3 character prefix to use with xplat generators: · app ✔ Packages installed successfully. ✔ Which linter would you like to use? · eslint Fetching @nx/jest... ✔ Which linter would you like to use? · eslint Error: Cannot create a new project features at libs/xplat. A project already exists in this directory. at addProjectConfiguration (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/nx/src/generators/utils/project-configuration.js:40:15) at configureProject (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/js/src/generators/library/library.js:239:46) at libraryGeneratorInternal (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/js/src/generators/library/library.js:45:11) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async libraryGenerator (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/js/src/generators/library/library.js:27:12) at async /Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js:51:24 at async callRuleAsync (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@angular-devkit/schematics/src/rules/call.js:80:18)
NX Cannot create a new project features at libs/xplat. A project already exists in this directory. `
@edusperoni @NathanWalker is there any ETA when xplat will be able to install on the latest version a fresh workspace? Currently it's not working and fails where you init with this error. I have tried it with and without installing eslint and fails both for web and nativescript setup... I also ensured that the xplat directory does not exist (as indicated in the error)
Any ideas?
`npx nx@latest g @nstudio/xplat:init
NX Generating @nstudio/xplat:init
✔ Would you like to generate xplat supporting architecture now? You can also generate later with: nx generate @nstudio/xplat:init · web ✔ Do you prefer to use a frontend framework? · angular ✔ Please input a 2-3 character prefix to use with xplat generators: · app ✔ Packages installed successfully. ✔ Which linter would you like to use? · eslint Fetching @nx/jest... ✔ Which linter would you like to use? · eslint Error: Cannot create a new project features at libs/xplat. A project already exists in this directory. at addProjectConfiguration (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/nx/src/generators/utils/project-configuration.js:40:15) at configureProject (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/js/src/generators/library/library.js:239:46) at libraryGeneratorInternal (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/js/src/generators/library/library.js:45:11) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async libraryGenerator (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/js/src/generators/library/library.js:27:12) at async /Users/jwrascoe/dev/scratch/edq-repo/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js:51:24 at async callRuleAsync (/Users/jwrascoe/dev/scratch/edq-repo/node_modules/@angular-devkit/schematics/src/rules/call.js:80:18)
NX Cannot create a new project features at libs/xplat. A project already exists in this directory. `
No way yet! The best is to stick with v19.0.0, not bad since Angular is same version.
@NathanWalker how can we solve this issue? Thanks!
Same issue:
npx nx g @nstudio/xplat:app
NX Generating @nstudio/xplat:application
✔ What name would you like for this app? · sample
✔ What type of app would like to create? · web
✔ In which directory should the app be generated? (Just press Enter for the default: directly in 'apps') ·
✔ Would you like to configure routing for this app? (Y/n) · true
✔ Which frontend framework should it use? · angular
✔ Use xplat supporting architecture? (Y/n) · true
✔ Packages installed successfully.
Fetching prettier...
✔ Which linter would you like to use? · eslint
Fetching @nx/jest...
✔ Which linter would you like to use? · eslint
Error: Cannot create a new project features at libs/xplat. A project already exists in this directory.
at addProjectConfiguration (nx/workspaces/electron/node_modules/@nstudio/xplat/node_modules/nx/src/generators/utils/project-configuration.js:40:15)
at configureProject (nx/workspaces/electron/node_modules/@nstudio/xplat/node_modules/@nx/js/src/generators/library/library.js:244:46)
at libraryGeneratorInternal (nx/workspaces/electron/node_modules/@nstudio/xplat/node_modules/@nx/js/src/generators/library/library.js:52:11)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async libraryGenerator (nx/workspaces/electron/node_modules/@nstudio/xplat/node_modules/@nx/js/src/generators/library/library.js:29:12)
at async nx/workspaces/electron/node_modules/@nstudio/xplat/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js:51:24
at async callRuleAsync (nx/workspaces/electron/node_modules/@angular-devkit/schematics/src/rules/call.js:80:18)
NX report:
Node : 23.7.0
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.9.2
nx : 20.4.3
@nx/js : 20.4.3
@nx/eslint : 20.4.3
@nx/workspace : 20.4.3
@nx/angular : 20.4.3
@nx/devkit : 20.4.3
@nx/module-federation : 20.4.3
@nx/web : 20.4.3
@nx/webpack : 20.4.3
typescript : 5.7.3
---------------------------------------
Community plugins:
@nstudio/angular : 20.0.3
@nstudio/electron : 20.0.3
@nstudio/electron-angular : 20.0.3
@nstudio/web : 20.0.3
@nstudio/web-angular : 20.0.3
@nstudio/xplat : 20.0.3
npm list:
npm list
@electron/[email protected]
├── @angular-devkit/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nx/[email protected]
├── @nx/[email protected]
├── @nx/[email protected]
├── @swc-node/[email protected]
├── @swc/[email protected]
├── @swc/[email protected]
├── [email protected]
└── [email protected]
@s0l4r I have been hoping that someone will resolve this.. but there does not seem to be any movement on it. I love xplat but its got to the point that I can use it anymore.
Hi @s0l4r and @jwrascoe the standalone component structure brings on new ideas that we want to work into xplat but no real firm date yet. You can use @nativescript/nx inside an xplat workspace right now btw (even with Nx 20+), which is what we're using now within xplat projects ourselves while we decide which standalone setup is best to commit to.
npx nx g @nativescript/nx:app
xplat has always used it under the hood for example.
For the web side, you can use Nx generator with angular:
npx nx g @nx/angular:application apps/web-app
You can import xplat shared modules into those for usage.
@NathanWalker interesting, thanks for the tip... I will try!