nxtend-team / nxtend

MIT License
189 stars 42 forks source link

cannot create app with schematic #630

Open nhhockeyplayer opened 2 years ago

nhhockeyplayer commented 2 years ago

thanks for any assist

meanstack02@admin starter % nx generate @nxtend/ionic-angular:application new-app     
✔ Which starter template would you like to use? · list
The "path" argument must be of type string. Received undefined
meanstack02@admin starter % 

Im happy to troubleshoot for any feedback

environment

meanstack02@admin starter % nx report

 >  NX   Report complete - copy this into the issue template

   Node : 16.15.1
   OS   : darwin x64
   yarn : 1.22.18

   nx : 14.1.9
   @nrwl/angular : 14.1.9
   @nrwl/cypress : 14.1.9
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.1.9
   @nrwl/eslint-plugin-nx : 14.1.9
   @nrwl/express : 14.1.9
   @nrwl/jest : 14.1.9
   @nrwl/js : 14.1.9
   @nrwl/linter : 14.1.9
   @nrwl/nest : 14.1.9
   @nrwl/next : Not Found
   @nrwl/node : 14.1.9
   @nrwl/nx-cloud : 14.0.5
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : 8.12.11
   @nrwl/storybook : 14.1.9
   @nrwl/web : Not Found
   @nrwl/workspace : 14.1.9
   typescript : 4.6.4
   ---------------------------------------
   Community plugins:
     @fortawesome/angular-fontawesome: 0.10.2
     @ionic/angular: 6.1.8
     @ngrx/effects: 13.2.0
     @ngrx/entity: 13.2.0
     @ngrx/router-store: 13.2.0
     @ngrx/schematics: 13.2.0
     @ngrx/store: 13.2.0
     @ngrx/store-devtools: 13.2.0
     @nxtend/capacitor: 12.1.0
     @nxtend/ionic-angular: 12.1.0
     angular-builder-custom-terser-options: 1.0.1
     ngx-bootstrap: 7.1.2
     @nxtend/capacitor: 12.1.0

node

meanstack02@admin starter % node -v
v16.15.1

ng

meanstack02@admin starter % ng --version
14.1.9
meanstack02@admin starter % nx generate @nxtend/ionic-angular:application myApp
✔ Which starter template would you like to use? · tabs
The "path" argument must be of type string. Received undefined
meanstack02@admin starter % nx generate @nxtend/ionic-angular:application myApp --dry-run
✔ Which starter template would you like to use? · blank
The "path" argument must be of type string. Received undefined
meanstack02@admin starter % 
SamehElalfi commented 2 years ago

I can confirm this issue with @nxtend/ionic-react too. I think the problem in @nxtend/capacitor package in projectRoot in node_modules\@nxtend\capacitor\src\generators\capacitor-project\lib\normalize-options.js. I tried to change the value of projectRoot manually by adding || "";

const projectRoot = (0, devkit_1.readProjectConfiguration)(host, options.project).root || "";

then run this command to create a new app

nx generate @nxtend/ionic-react:application appName

and it worked! after that I added a capacitor.config.json file to my app

{
  "appId": "io.ionic.appname",
  "appName": "app-name",
  "webDir": "../../dist/packages/app-name",
  "bundledWebRuntime": "false"
}

NOTE: this is not fixing the issue but I hope it'll help to fix it as soon as possible.

nhhockeyplayer commented 2 years ago

this appears to be taking out nxpm as well... nxpm is a wrapper to plugins https://github.com/nxpm/nxpm-cli/issues/20

Thanks for quick response... how can I get those changes is there a new release? I tried

    "@capacitor/cli": "^4.0.0-alpha.2",
    "@capacitor/core": "^4.0.0-alpha.2",

still no remedy

devinshoemaker commented 2 years ago

These plugins are moving over to the Nxext repo, and an Nx 14 version has been released that may resolve this issue. There are some migration guides on their docs site, here's a link to the Ionic Angular guide: https://nxext.dev/docs/ionic-angular/migrating-from-nxtend.html