Open nx-irvin opened 2 years ago
@nx-irvin thanks for the report. I just tried this here:
npx create-nx-workspace@latest
> sample
// let dependencies install and finish initial setup
> cd sample
> npm install @nstudio/xplat -D
> npx nx g app
> myapp
> web
> npx nx run web-myapp:serve
// works
You may try leaving web
out of the app name since xplat adds the platform naming conventions itself - that may be interfering with the generators.
Hi! Thanx for the quick response. I tried without the word web and I get the same error.
When you can run “ng —version”
Sounds like there could be global angular versions installed which may be having an effect?
Ok, this is what i got:
Angular CLI: 13.2.6 Node: 14.18.1 Package Manager: npm 8.5.4 OS: win32 x64
Angular: undefined ...
@angular-devkit/architect 0.1302.6 (cli-only) @angular-devkit/core 13.3.5 @angular-devkit/schematics 13.3.5 @schematics/angular 13.3.5 typescript 4.6.4
Thanks could be your node version. Would generally recommend 15+ but I would switch to using node 16, 17 or 18. I’m using node 18 with npm 8.10.0 myself (latest of everything).
I will update to version 18 and 8.10.0 and let you know.
I´m still getting the same error. I tried in a different PC installing all from scratch and the same result.
I think it may be due to a Nx preset you may be using, when doing: npx create-nx-workspace@latest Then naming the workspace, after that it asks what preset you’d like to use - are you choosing Angular? If so that is likely the issue. You would want to choose empty or no preset - I believe they call it simply “apps” the first one in list.
@nx-irvin lemme know if the preset was it when you get a chance; pretty curious here.
Apparently it was due to the Nx 'apps' preset. I was finally able to go around this issue using the 'angular' preset.
Interesting I see exact opposite of that here (wonder if Windows has some affect here) - we’ll leave this open until more finite conclusions can be drawn. Thanks for mentioning this and that there is a solution for it.
I'm trying to create a web a app following the getting started steps. I managed to create an Ionic + Angular App, but when i try the same steps with web + angular it doesn't work. I get the following messages:
Error: Could not find an NgModule. Use the skip-import option to skip importing in NgModule. at findModule (C:\na\dvlp\wks2021\nexus-monorepo\node_modules\@schematics\angular\utility\find-module.js:81:11) at findModuleFromOptions (C:\na\dvlp\wks2021\nexus-monorepo\node_modules\@schematics\angular\utility\find-module.js:26:38) at C:\na\dvlp\wks2021\nexus-monorepo\node_modules\@schematics\angular\component\index.js:105:66 Error: Could not find an NgModule. Use the skip-import option to skip importing in NgModule. at findModule (C:\na\dvlp\wks2021\nexus-monorepo\node_modules\@schematics\angular\utility\find-module.js:81:11) at findModuleFromOptions (C:\na\dvlp\wks2021\nexus-monorepo\node_modules\@schematics\angular\utility\find-module.js:26:38)
Steps: