Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Angular 4.4 SPA to Nx Workspace fails #235

Closed
xeax opened this issue Jan 26, 2018 · 4 comments
Closed

Convert Angular 4.4 SPA to Nx Workspace fails #235

xeax opened this issue Jan 26, 2018 · 4 comments
Labels

Comments

@xeax
Copy link

xeax commented Jan 26, 2018

F:\nrwl>ng generate workspace app1 --collection=@nrwl/schematics
Schematic "workspace" not found in collection "@schematics/angular".
Error: Schematic "workspace" not found in collection "@schematics/angular".
    at BaseException (F:\nrwl\node_modules\@angular-devkit\schematics\src\exception\exception.js:12:9)
    at UnknownSchematicException (F:\nrwl\node_modules\@angular-devkit\schematics\src\engine\engine.js:27:9)
    at SchematicEngine.createSchematic (F:\nrwl\node_modules\@angular-devkit\schematics\src\engine\engine.js:65:19)
    at CollectionImpl.createSchematic (F:\nrwl\node_modules\@angular-devkit\schematics\src\engine\collection.js:11:29)
    at Object.getSchematic (F:\nrwl\node_modules\@angular\cli\utilities\schematics.js:40:23)
    at Class.run (F:\nrwl\node_modules\@angular\cli\tasks\schematic-run.js:19:40)
    at Class.run (F:\nrwl\node_modules\@angular\cli\commands\generate.js:138:33)
    at resolve (F:\nrwl\node_modules\@angular\cli\ember-cli\lib\models\command.js:273:20)
    at Class.validateAndRun (F:\nrwl\node_modules\@angular\cli\ember-cli\lib\models\command.js:251:12)
    at Promise.resolve.then.then (F:\nrwl\node_modules\@angular\cli\ember-cli\lib\cli\cli.js:154:24)

package.json

{
  ....
  "dependencies": {
    "@angular/animations": "4.4.3",
    "@angular/cdk": "2.0.0-beta.11",
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/flex-layout": "2.0.0-beta.9",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/material": "2.0.0-beta.11",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@angular/router": "4.4.3",
    "@swimlane/ngx-dnd": "3.0.0",
    "angular-calendar": "0.19.0",
    "angular-in-memory-web-api": "0.4.6",
    "angular-oauth2-oidc": "3.0.3",
    "angular2-text-mask": "8.0.4",
    "classlist.js": "1.1.20150312",
    "core-js": "2.5.0",
    "d3": "4.10.0",
    "file-saver": "1.3.3",
    "hammerjs": "2.0.8",
    "highlight.js": "9.12.0",
    "intl": "1.2.5",
    "md2": "0.0.28",
    "moment": "2.18.1",
    "ng-block-ui": "1.0.0-beta.16",
    "ngx-cookie-service": "1.0.7",
    "ngx-perfect-scrollbar": "4.6.2",
    "perfect-scrollbar": "0.8.1",
    "rxjs": "5.4.3",
    "text-mask-addons": "3.7.1",
    "web-animations-js": "2.3.1",
    "xlsx": "0.11.14",
    "zone.js": "0.8.17"
  },
  "devDependencies": {
    "@angular/cli": "1.4.2",
    "@angular/compiler-cli": "4.4.3",
    "@angular/language-service": "4.4.3",
    "@angularclass/hmr": "2.1.3",
    "@ngtools/webpack": "1.7.1",
    "@nrwl/schematics": "0.6.19",
    "@types/jasmine": "2.6.0",
    "@types/jasminewd2": "2.0.2",
    "@types/node": "6.0.88",
    "codelyzer": "3.0.1",
    "jasmine-core": "2.6.2",
    "jasmine-spec-reporter": "4.1.0",
    "karma": "1.7.1",
    "karma-chrome-launcher": "2.1.1",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "1.2.1",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "node-sass": "4.5.3",
    "protractor": "5.1.2",
    "ts-node": "3.0.4",
    "tslint": "5.3.2",
    "typescript": "2.3.3"
  }

@xeax
Copy link
Author

xeax commented Jan 29, 2018

Same error on
@nrwl/[email protected]
or
@nrwl/[email protected]

@xeax
Copy link
Author

xeax commented Jan 29, 2018

Issue solved with:
npm install --save-dev @angular/[email protected]

May need remove old version of @ngtools/webpack from package.json.

This versions of nrwl/schematics works fine for my case:
@nrwl/[email protected]
@nrwl/[email protected]

@vsavkin
Copy link
Member

vsavkin commented Feb 18, 2018

You have to use the newer version of the CLI. The older one didn't support custom collections. I'll update the docs to mention it.

@vsavkin vsavkin closed this as completed Feb 18, 2018
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants