nxext / nx-extensions

Nx Extensions for Stencil, Svelte, SolidJS, Preact, Ionic, and Capacitor
MIT License
465 stars 102 forks source link

Ionic Angular - can't generate page in new project #917

Open ashgibson opened 1 year ago

ashgibson commented 1 year ago

Brand new project with the following package.json and I can't generate a new page in an empty app.

{
  "name": "shss-nx",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {},
  "private": true,
  "devDependencies": {
    "@angular-devkit/build-angular": "~15.2.0",
    "@angular-devkit/core": "~15.2.0",
    "@angular-devkit/schematics": "~15.2.0",
    "@angular-eslint/eslint-plugin": "~15.0.0",
    "@angular-eslint/eslint-plugin-template": "~15.0.0",
    "@angular-eslint/template-parser": "~15.0.0",
    "@angular/cli": "~15.2.0",
    "@angular/compiler-cli": "~15.2.0",
    "@angular/language-service": "~15.2.0",
    "@capacitor/android": "^3.6.0",
    "@capacitor/cli": "^3.6.0",
    "@capacitor/ios": "^3.6.0",
    "@nrwl/angular": "^15.8.7",
    "@nrwl/cypress": "15.8.7",
    "@nrwl/eslint-plugin-nx": "15.8.7",
    "@nrwl/jest": "15.8.7",
    "@nrwl/js": "^15.8.7",
    "@nrwl/linter": "15.8.7",
    "@nrwl/nx-cloud": "latest",
    "@nrwl/workspace": "15.8.7",
    "@nxext/ionic-angular": "^15.7.0",
    "@schematics/angular": "~15.2.0",
    "@types/jest": "^29.4.0",
    "@types/node": "16.11.7",
    "@typescript-eslint/eslint-plugin": "^5.36.1",
    "@typescript-eslint/parser": "^5.36.1",
    "cypress": "^12.2.0",
    "eslint": "~8.15.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "jest": "^29.4.1",
    "jest-environment-jsdom": "^29.4.1",
    "jest-preset-angular": "~13.0.0",
    "nx": "15.8.7",
    "prettier": "^2.6.2",
    "ts-jest": "^29.0.5",
    "ts-node": "10.9.1",
    "typescript": "~4.9.5"
  },
  "dependencies": {
    "@angular/animations": "~15.2.0",
    "@angular/common": "~15.2.0",
    "@angular/compiler": "~15.2.0",
    "@angular/core": "~15.2.0",
    "@angular/forms": "~15.2.0",
    "@angular/platform-browser": "~15.2.0",
    "@angular/platform-browser-dynamic": "~15.2.0",
    "@angular/router": "~15.2.0",
    "@capacitor/core": "^3.6.0",
    "@ionic/angular": "^6.1.4",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.12.0"
  }
}

➜ shss-nx git:(main) nx g page --verbose

NX Generating @nxext/ionic-angular:page

✔ What is the name of the project for this page? · shss-mobile ✔ What name would you like to use? · login

NX (0 , file_utils_1.readFileIfExisting) is not a function

TypeError: (0 , file_utils_1.readFileIfExisting) is not a function at updateAppRoutingModule (/Users/myname/Projects/shss/shss-nx/node_modules/@nxext/ionic-angular/src/generators/page/lib/update-routing-file.js:10:66) at /Users/myname/Projects/shss/shss-nx/node_modules/@nxext/ionic-angular/src/generators/page/generator.js:24:58 at Generator.next () at /Users/myname/Projects/shss/shss-nx/node_modules/tslib/tslib.js:167:75 at new Promise () at Object.__awaiter (/Users/myname/Projects/shss/shss-nx/node_modules/tslib/tslib.js:163:16) at pageGenerator (/Users/myname/Projects/shss/shss-nx/node_modules/@nxext/ionic-angular/src/generators/page/generator.js:21:20) at Object. (/Users/myname/Projects/shss/shss-nx/node_modules/nx/src/command-line/generate.js:243:36) at Generator.next () at fulfilled (/Users/myname/Projects/shss/shss-nx/node_modules/tslib/tslib.js:164:62)

DominikPieper commented 1 year ago

@ashgibson the 15.7 version is compatible with Nx 15.7. 15.8 isn’t supported yet