angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Ng Generate Library Fails on 10.1.0

Open idwebmedia opened this issue 6 years ago • 3 comments

🐞 Bug report

Command

  • [x] generate

Is this a regression?

Yes

Description

Updating the Angular Cli to version 10.1.0 breaks library schematic

🔬 Minimal Reproduction

ng new test --skipInstall=true
cd test

Update package.json using latest @angular version 10.1.0 (see environment below) and install

npm install

Generate library

ng g library lib-test

I tried a few other schematics (app, component, directive, service) and they seem to be working as expected. Looks to just be library but may want to do a full regression on the rest.

🔥 Exception or Error

Cannot read property 'paths' of undefined

🌍 Your Environment


Angular CLI: 10.1.0
Node: 10.16.3
OS: win32 x64

Angular: 10.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1001.0
@angular-devkit/build-angular     0.1001.0
@angular-devkit/build-optimizer   0.1001.0
@angular-devkit/build-webpack     0.1001.0
@angular-devkit/core              10.1.0
@angular-devkit/schematics        10.1.0
@ngtools/webpack                  10.1.0
@schematics/angular               10.1.0
@schematics/update                0.1001.0
rxjs                              6.5.5
typescript                        4.0.2
webpack                           4.44.1

idwebmedia avatar Sep 06 '20 16:09 idwebmedia

Can you try updating your global cli version?

Nb: Updating the @angular packages directly in your package.json without using ng update might cause undefined behaviours, this is because migrations will not be executed.

alan-agius4 avatar Sep 06 '20 17:09 alan-agius4

You are correct. Updating the global fixed the issue. Thank you.

idwebmedia avatar Sep 06 '20 17:09 idwebmedia

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.