Nx: Issue with Angular CLI 6.1.0

Created on 26 Jul 2018  路  6Comments  路  Source: nrwl/nx

Issue type

I'm submitting a ...

  • [X ] bug report
  • [ ] feature request

Issue description

Current behavior:
Create new app using:

create-nx-workspace myworkspacename

Then upgrade to Angular 6.1 using:

ng update --all --force

After that try to type:

ng generate lib --help

You'd get this error:

Cannot find module '@schematics/angular/utility/route-utils' Error: Cannot find module '@schematics/angular/utility/route-utils' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (C:\Users\hmuba\Downloads\Angular\myworkspacename\node_modules\@nrwl\schematics\src\collection\library\index.js:13:21) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3)

After some debugging, in Angular CLI 6.1.0 this file doesn't exist:
@schematics/angular/utility/route-utils

After reverting Angular CLI to version 6.0.1 the file is there so everything works

Expected behavior:

To work with Angular CLI 6.1.0

in-progress bug

Most helpful comment

Thanks for the details. There are several things we need to change to be compatible with @angular/[email protected].

Hang tight for now, the plan is to release @nrwl/[email protected] with full compatibility with Angular 6.1 ASAP. :wink:

All 6 comments

I get the same error when running
ng add @nrwl/schematics
inside my existing angular cli project. I'm guessing it's related.

@angular/[email protected] is using @schematics/[email protected], where for example when you want to use ng add the route-utility module is missing.

You have to use @angular/[email protected], which is using @schematics/[email protected] when you want to work with.

works for me with angular cli 6.1.1

update to angular cli 6.1.1, still having same error.

would have been surprising if it had fixed the problem,
cuz the cli 6.1.1 update says : "This is a quick patch to allow users to work with TypeScript 2.9 without warnings."

Thanks for the details. There are several things we need to change to be compatible with @angular/[email protected].

Hang tight for now, the plan is to release @nrwl/[email protected] with full compatibility with Angular 6.1 ASAP. :wink:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kmkatsma picture kmkatsma  路  3Comments

joelmuskwe picture joelmuskwe  路  3Comments

SWGeekPD picture SWGeekPD  路  3Comments

about-code picture about-code  路  3Comments

markphip picture markphip  路  3Comments