nrwl / nx-examples

Example repo for Nx workspace
https://nrwl-nx-examples-cart.netlify.app/cart
894 stars 445 forks source link

Can't generate app! #32

Closed HackPoint closed 6 years ago

HackPoint commented 6 years ago
node -v
v9.5.0
ng -v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.5
Node: 9.5.0
OS: darwin x64
Angular: 5.2.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cli: 1.6.5
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.4.5
@angular-devkit/schematics: 0.4.5
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.4.5
typescript: 2.7.2
webpack: 3.10.0

$ - ng generate app @any-application --routing --style=scss

Throws exception:

Error: Unregistered task "node-package" in schematic "app".
Unregistered task "node-package" in schematic "app".
jesusvalenzuelar commented 6 years ago

Hi, did you solve it? I have the same issue like you.

HackPoint commented 6 years ago

@jesusvalenzuelar nope. Removed nrwl and went angular6 it's already built-in.

jesusvalenzuelar commented 6 years ago

Ok, yes of course I saw Angular 6 has the same features. But I tried nwrl because I am working on an existing app in angular 5 and I have to do some refactors. Well I'll consider to change to angular 6 instead.

Thnaks.

HackPoint commented 6 years ago

@jesusvalenzuelar I would suggest you to do so. Because guys from nwrl aren't responsive about their issues. I tried to ask the same question in SO also got no answer. So just go to the original. Anyway just remove this framework.

Yonet commented 6 years ago

@HackPoint @jesusvalenzuelar Apologize for the late response. We have rotation to check nx repo issues but not for the example repo. Next time post there please.

For the issue you are having. You have to be inside an nx workspace to be able to create an app.

sudo npm i @angular/cli -g
sudo npm i @nrwl/schematics -g
sudo npm i @ngrx/schematics -g
ng new workspace --collection @nrwl/schematics
ng generate app any-application --routing --style=scss